Skip to content

Phase 4 - Skeleton Layout & Routing

  • Track: Both (MVP & Showcase)
  • Effort: Moderate, depends on project complexity
  • Dependencies: Phase 0-3 completed
  • Deliverables: Base layout, routing structure, navigation, metadata system
  • Design system configured
  • Content architecture defined
  • Tooling and CI functional
  • Initial performance baseline planned
StepTaskMVPShowcaseNotes
4.01Create base layoutHTML structure, metadata
4.02Build header componentLogo, nav, theme toggle
4.03Build footer componentLinks, copyright
4.04Design mobile navigationResponsive pattern
4.05Create minimal page routesindex.astro & 404.astro only. See guide.
4.06Set up metadata systemSEO, OpenGraph
4.07Configure font loadingPreload, swap
4.08Add security headersCSP, HSTS
4.09Set up skip linksAccessibility
4.10Create error pages404, 500
4.11Review analytics options☑️☑️Optional. See dedicated guide.
4.12Baseline performanceInitial metrics

This template does not include analytics out-of-the-box to respect user privacy. Adding analytics is an optional step that you can take based on your project’s needs. We have created a detailed guide with copy-paste recipes for popular, privacy-focused providers.

This approach keeps the template clean while empowering you to make the right choice for your site.

  1. Missing Font Attributes: Forgetting crossorigin on preload

    • Solution: Always include all required attributes
  2. Blocking Resources: Scripts/styles blocking render

    • Solution: Use defer/async, critical CSS inline
  3. Poor Mobile UX: Desktop-first navigation

    • Solution: Design mobile-first, test on devices
  4. Missing Meta Tags: Incomplete SEO/social setup

    • Solution: Use layout component for consistency
  • Base layout component complete
  • Header with navigation functional
  • Footer with links and social
  • Mobile navigation working smoothly
  • All main routes created
  • Metadata system implemented
  • Fonts loading optimally
  • Security headers configured
  • Skip links for accessibility
  • Error pages created
  • Analytics ready (privacy-first)
  • Performance baseline recorded

If skeleton needs major changes:

  1. Layout Issues:

    • Keep old layout as BaseLayoutV1
    • Migrate pages gradually
    • Test each migration
  2. Route Changes:

    • Set up redirects in config
    • Update sitemap
    • Check internal links
  3. Performance Regression:

    • Compare with baseline
    • Check resource loading
    • Review recent changes
  • src/layouts/BaseLayout.astro - Main layout
  • src/components/layout/* - Header/Footer
  • public/_headers - Security headers
  • perf-baseline/scores.json - Performance targets
  • “Create Astro layout with SEO metadata”
  • “Build accessible mobile navigation”
  • “Set up security headers for Astro”
  • “Configure font preloading strategy”
  • Site structure and pages
  • Brand/logo assets
  • Navigation hierarchy
  • Performance targets