diff --git a/.vitepress/config/constants.ts b/.vitepress/config/constants.ts index 5d2852f..5b41f75 100644 --- a/.vitepress/config/constants.ts +++ b/.vitepress/config/constants.ts @@ -19,7 +19,7 @@ export const navItemOrder: Record = { "develop-from-scratch", ], sdk: ["quickstart", "cli", "services", "generator"], - reference: ["api", "platform", "concepts", "infrastructure"], + reference: ["changelog","security", "api", "platform", "concepts", "infrastructure"], "getting-started": ["quickstart", "core-concepts", "console"], "app-shell": [ "introduction", @@ -93,6 +93,7 @@ export const sidebarItemOrder: Record = { "login", ], function: ["overview", "builtin-interfaces"], + reference: ["changelog","api", "platform", "concepts", "infrastructure", "security"], "app-shell": [ "introduction", "quickstart", diff --git a/.vitepress/config/sidebar.ts b/.vitepress/config/sidebar.ts index 5d9c458..e303007 100644 --- a/.vitepress/config/sidebar.ts +++ b/.vitepress/config/sidebar.ts @@ -89,16 +89,23 @@ export function generateSidebar( for (const dirName of sortedDirs) { const subdirPath = path.join(dir, dirName); const subdirBasePath = `${basePath}/${dirName}`; + const dirIndexPath = path.join(fullPath, dirName, "index.md"); + const hasIndex = fs.existsSync(dirIndexPath); const subItems = generateSidebar(docsDir, subdirPath, subdirBasePath, depth + 1); + // Add directory if it has sub-items OR if it has an index.md if (subItems.length > 0) { - // Check if directory has an index.md to read title from - const dirIndexPath = path.join(fullPath, dirName, "index.md"); items.push({ - text: toTitle(dirName, { filePath: fs.existsSync(dirIndexPath) ? dirIndexPath : undefined }), + text: toTitle(dirName, { filePath: hasIndex ? dirIndexPath : undefined }), collapsed: depth > 0, items: subItems, }); + } else if (hasIndex) { + // Directory with only index.md - add as direct link + items.push({ + text: toTitle(dirName, { filePath: dirIndexPath }), + link: subdirBasePath, + }); } } diff --git a/.vitepress/env.d.ts b/.vitepress/env.d.ts index b08467c..def6a72 100644 --- a/.vitepress/env.d.ts +++ b/.vitepress/env.d.ts @@ -5,3 +5,4 @@ declare module "*.vue" { const component: DefineComponent; export default component; } + diff --git a/.vitepress/theme/components/Changelog.vue b/.vitepress/theme/components/Changelog.vue new file mode 100644 index 0000000..7c7bd2c --- /dev/null +++ b/.vitepress/theme/components/Changelog.vue @@ -0,0 +1,100 @@ + + + + +