Quick steps to add an Astro page without breaking navigation or metadata.
- Pick the route path: Create a folder in
src/pageswithindex.astroinside (e.g.,src/pages/new-page/index.astro) to keep clean, trailing-slash URLs. - Start from
BaseLayout: ImportBaseLayoutat the top of the page and passtitleanddescriptionfor SEO and social cards. The layout will set canonical, favicon, and Open Graph defaults. - Keep copy in
src/content: Add apageContentobject in a new or existing file undersrc/content/(seesrc/content/types.tsfor helpers likePageWithPermalink). Pull text, permalinks, and CTA labels from that object inside the page to keep strings consistent with navigation and tests. - Compose with shared components: Use
PageIntrofor the hero,SectionBlockfor page sections, andCardGrid/CardItemfor collections. Import components fromsrc/components/and reuse theclassNameprops instead of adding inline styles. - Update navigation when needed: Add the new route to the
navLinksarray insrc/components/Navigation.astroso it appears in the primary menu. Add footer links only if the page should be discoverable site-wide. - Validate before opening a PR: Run
bun run checkto cover linting, types, tests, and Astro's checker.