Adding new pages to the menu #311
maheshrijal
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found many issues asking for instructions on how to update & add pages. Perhaps this will be useful to those who need it. Also, this could be converted into a wiki or something.
To add a new page you would need to create a new layout for your page in the
layout
folder. As an example if you want to add anotes
page, you would create a fileNotesLayout.astro
in thelayouts
folder.Then, you will create a
notes.md
page in thepage
folder with the frontmatter.Then, you need to add your page to the header in
Header.astro
export config.Eg:
export interface Props { activeNav?: "posts" | "tags" | "about" | "notes"| "search"; }
Finally, you add a link to the header in the same file.
Beta Was this translation helpful? Give feedback.
All reactions