Ticket: Sitemap Integration

Goal

Produce a sitemap for the Aphasia Games website that is automatically published when the site is deployed, improving SEO and search engine discoverability.

Implementation

  • Installed @astrojs/sitemap package and configured it in astro.config.mjs
  • Updated public/robots.txt to reference the sitemap index
  • Added <link rel="sitemap" href="/sitemap-index.xml" /> to the <head> in src/layouts/Layout.astro
  • Documented the sitemap setup in:
    • cline-docs/technical/architecture.md
    • cline-docs/marketing/seo.md

Results

Upon building the Astro site, the following files are now automatically generated:

  • sitemap-index.xml
  • sitemap-0.xml

Search engines can now discover all site content through both the robots.txt file and the HTML head reference.

Questions Investigated

  • Does the astro-seo component have built-in sitemap functionality? No, requires separate integration.

Notes for Future Reference

  • Sitemap generation happens automatically during build process
  • No manual maintenance required for the sitemap
  • Pages added to the site will automatically appear in the sitemap