diff --git a/examples/docs/src/config.ts b/examples/docs/src/config.ts index 96edecaf3..4b6268e23 100644 --- a/examples/docs/src/config.ts +++ b/examples/docs/src/config.ts @@ -1,6 +1,6 @@ export const sidebar = [ { - text: 'Introduction', + text: 'Introduction', link: '/', children: [ { text: 'Getting Started', link: '/getting-started' }, diff --git a/examples/docs/src/pages/getting-started.md b/examples/docs/src/pages/getting-started.md index e569ca790..e034a47ca 100644 --- a/examples/docs/src/pages/getting-started.md +++ b/examples/docs/src/pages/getting-started.md @@ -13,7 +13,7 @@ The page navigation, through the side bar on the left, needs to be manually upda ```ts export const sidebar = [ { - text: 'Introduction', + text: 'Introduction', link: '/', children: [ { text: 'Getting Started', link: '/getting-started' }, @@ -22,17 +22,17 @@ export const sidebar = [ }, ]; ``` + You can change this file to match the pages you want to display, the items within `children` can also have children elements, but only the first level and second levels will be displayed. The page navigation is generated in the `src/components/SiteSidebar.astro`, so if you want to change the depth of elements displayed, styles, etc, that's the place to go. ## Section navigation -The section navigation, through the side bar on the right, is automatically generated by the `src/components/DocSidebar.tsx` file, it uses the meta-data from markdown files to generate the structure you see. +The section navigation, through the side bar on the right, is automatically generated by the `src/components/DocSidebar.tsx` file, it uses the meta-data from markdown files to generate the structure you see. By default only elements from depth 2 to 5 will be displayed, and at the moment doesn't work for `.astro files`. - ## Other Components ### Footer