Skip to content

feat(ai): add navigable /sitemap.md site map - #2254

Merged
jung-thomas merged 1 commit into
DEVfrom
sitemap-md
Sep 11, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
sitemap-md

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

What

Adds a human- and AI-navigable /sitemap.md, mirroring CAP/Capire's sitemap.md: a Markdown map of the whole site so AI tools (and humans) can find what's available and go straight to the right page.

Requested by Tom after seeing CAP's sitemap.md. Scope approved: Nav + missions expanded.

Why a fourth AI surface

It's a navigable hierarchy, distinct from what we already ship:

  • sitemap.xml — flat XML URL list for crawlers
  • llms-full.txt — flat metadata dump of every resource
  • sitemap.md — the site's structure: verb lanes + each mission expanded to its ordered tutorials

How

  • scripts/fetch-sitemap-catalog.ts — build-time GET /build/catalog, flattens missions + ordered tutorial slugs into hugo/data/sitemap_catalog.json. Wired into build:all after fetch-topic-clusters. Fail-open: no CAP_BASE_URL (dev / plain build:hugo) or a fetch error → empty list → template falls back to the /missions/ index link, exactly like llms.txt. Missions aren't Hugo pages (served dynamically from CAP), so this build-time fetch is the only way a static map can enumerate them.
  • hugo.toml — sitemapmd output format on home. Uses a dedicated text/x-web-markdown media type (suffixes = ['md']) so Hugo writes the file as sitemap.md — the shared text/markdown lists txt first (which is why llms.txt is .txt). Wire Content-Type is set by the approuter from the .md extension (markdown negotiation, feat(content): Accept: text/markdown negotiation on primary tutorial URL #2252).
  • sitemapmd.md template — Navigation (6 verb lanes from the section pages + shelves, best-effort) / Missions (expanded, with fallback) / Topics (top 30 tags) / Reference.
  • Cross-links — from llms.txt Reference, public AGENTS.md, and ai-consumption.md (documented as feature feat: tutorial feedback form + AEM cutover follow-ups #16 + TL;DR row).
  • Smoke test — /sitemap.md in seo-files.test.js, tolerant of a sparse catalog (asserts nav + Missions heading + a /tutorials|missions/ link).

Verification

hugo --source hugo --minify locally produces hugo/public/sitemap.md (.md, not .txt) with the brand header, all six verb lanes, the mission fallback (no CAP locally), and Reference links. Missions expand and Topics populate in a full build with CAP_BASE_URL set.

Mirror CAP/Capire's sitemap.md with a human- and AI-navigable map:
verb-lane navigation plus every mission expanded to its ordered
tutorials. Distinct from sitemap.xml (flat crawler XML) and
llms-full.txt (flat metadata dump) — this is a navigable hierarchy.

- scripts/fetch-sitemap-catalog.ts: build-time GET /build/catalog fetch
  into hugo/data/sitemap_catalog.json; fail-open (empty -> /missions/
  index fallback) when CAP_BASE_URL absent, like llms.txt.
- hugo.toml: sitemapmd output format on home; dedicated
  text/x-web-markdown media type so the file is written as .md.
- sitemapmd.md template: Navigation / Missions / Topics / Reference.
- Cross-links from llms.txt, public AGENTS.md, ai-consumption.md (#16).
- Smoke test for /sitemap.md (sparse-catalog tolerant).
@jung-thomas
jung-thomas merged commit b8fd27f into DEV Sep 11, 2026
7 checks passed
@jung-thomas
jung-thomas deleted the sitemap-md branch September 11, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant