Last active
December 2, 2023 11:26
-
-
Save SahilMahadwar/b2edbad8f2dc4605d109dc12edca4476 to your computer and use it in GitHub Desktop.
example nav
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nav = [ | |
// Start Here is super parent | |
{ | |
label: "Start Here", | |
// this link will throw an 404 and thats okay. | |
link: "/docs/start-here/", // if you notice start-here got converted to "Start Here" for label so you will have to do some string conversions | |
enabled: true, | |
subItems: [ | |
{ | |
label: "Install Astro", // "Install Astro" title is coming from markdown frontmatter field called linkTitle so if its a folder it will use folder name as parent if its a single file means its a page then we will use linkTitle | |
link: "/docs/start-here/install", // this link should work | |
enabled: true, | |
subItems: [], | |
}, | |
{ | |
label: "Editor Setup", // here editor support is parent of subitems so we will be using folder name | |
link: "/docs/start-here/editor-setup", // if you notice editor-setup got converted to "Editor Setup" for label so you will have to do some string conversions | |
enabled: true, | |
subItems: [ | |
{ | |
label: "Vscode", | |
link: "/docs/start-here/editor-setup/vscode", // this will be page | |
enabled: true, | |
subItems: [], | |
}, | |
{ | |
label: "Why Astro", // here Why Astro is parent of subitems so we will be using folder name | |
link: "/docs/start-here/editor-setup/why-astro", | |
enabled: true, | |
subItems: [ | |
{ | |
label: "ESLint", | |
link: "/docs/start-here/editor-setup/why-astro/eslint", // this will be page | |
enabled: true, | |
subItems: [], | |
}, | |
], | |
}, | |
], | |
}, | |
], | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment