Skip to content

How to add additional pages to menu? #342

Answered by maheshrijal
danielrosehill asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! 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 a notes page, you would create a file NotesLayout.astro in the layouts folder.

---
import { SITE } from "@config";
import Breadcrumbs from "@components/Breadcrumbs.astro";
import Footer from "@components/Footer.astro";
import Header from "@components/Header.astro";
import Layout from "./Layout.astro";

export interface Props {
  frontmatter: {
    title: string;
    description?: string;
  };
}

const { frontmatter } = Astro.props;
---

<Layout title={`${frontmatter.title} | ${SITE.title}`}>
  <Header activeNav="notes" />
  <Breadcrumbs />
  <main id="main-cont…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by satnaing
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #298 on August 02, 2024 11:22.