From ddd81f7a1e5042e4acb2270066788d74f4718439 Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Fri, 9 May 2025 19:50:25 +0800 Subject: [PATCH 1/2] feat: set sidebar position for pages --- scripts/process-releases.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/process-releases.js b/scripts/process-releases.js index a4e01889..e7bb796b 100644 --- a/scripts/process-releases.js +++ b/scripts/process-releases.js @@ -66,8 +66,13 @@ async function processReleases(opts) { // ### Customization await addMetadataToFile(join(docDestination, 'index.md'), { title: 'Introduction', + ['sidebar_position']: 0, [`displayed_sidebar`]: 'docsSidebar', }) + await addMetadataToFile(join(docDestination, 'Guides', 'Getting-Started.md'), { ['sidebar_position']: 0 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Database.md'), { ['sidebar_position']: 1 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Recommendations.md'), { ['sidebar_position']: 2 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Testing.md'), { ['sidebar_position']: 3 }) docsVersions.push({ tag: docTree.releseTag, versionName }) } From d5fdc6ed1e45898b9f705050290f0afc2d4ce3bb Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Tue, 13 May 2025 01:39:11 +0800 Subject: [PATCH 2/2] move "Write-plugin" and "Recommendations" --- scripts/process-releases.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/process-releases.js b/scripts/process-releases.js index e7bb796b..298bed56 100644 --- a/scripts/process-releases.js +++ b/scripts/process-releases.js @@ -70,9 +70,10 @@ async function processReleases(opts) { [`displayed_sidebar`]: 'docsSidebar', }) await addMetadataToFile(join(docDestination, 'Guides', 'Getting-Started.md'), { ['sidebar_position']: 0 }) - await addMetadataToFile(join(docDestination, 'Guides', 'Database.md'), { ['sidebar_position']: 1 }) - await addMetadataToFile(join(docDestination, 'Guides', 'Recommendations.md'), { ['sidebar_position']: 2 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Recommendations.md'), { ['sidebar_position']: 1 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Database.md'), { ['sidebar_position']: 2 }) await addMetadataToFile(join(docDestination, 'Guides', 'Testing.md'), { ['sidebar_position']: 3 }) + await addMetadataToFile(join(docDestination, 'Guides', 'Write-Plugin.md'), { ['sidebar_position']: 4 }) docsVersions.push({ tag: docTree.releseTag, versionName }) }