Skip to content

refactor: write the sitemap, robots file and metadata partial from the website package - #518

Merged
has2k1 merged 2 commits into
mainfrom
refactor/seo-files
Nov 3, 2026
Merged

has2k1 merged 2 commits into
mainfrom
refactor/seo-files

Conversation

@has2k1

@has2k1 has2k1 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

The code that writes sitemap.xml, robots.txt and the HTML metadata partial now lives beside the other SEO and website features instead of in the documentation builder. Built sites are unchanged, and the build and great-docs seo --fix print the same lines as before.

These writers printed their own messages and each looked up the site's canonical address, which tied them to the builder. They now take the address from their caller and report through a callback, so the build and the seo command share them directly.

The partial that carries page titles, translation metadata, the Open
Graph page type and the build time is now composed and registered by a
website feature module instead of the documentation builder. The module
reports an invalid title template through a callback rather than
printing it; the build prints the same warning as before.
The sitemap and robots writers, and the step that runs both after the
site is rendered, now live beside the other SEO features instead of in
the documentation builder. The build and `great-docs seo --fix` resolve
the canonical site address once and pass it to the writers, which report
their progress through a callback. Both print the same lines as before,
and a failed write after rendering still only warns.
@has2k1
has2k1 added this pull request to stack #521 November 3, 2026 11:45
@has2k1
has2k1 merged commit 7ac52c1 into main Nov 3, 2026
7 checks passed
@has2k1
has2k1 deleted the refactor/seo-files branch November 3, 2026 11:57
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

📚 Preview this PR's docs locally

Fetch the just-built site and open it in your browser:

# this exact build
great-docs preview --run 41629959693

# or always the latest build for this PR
great-docs preview --pr 518
Auth & tips
  • Requires great-docs: pip install great-docs (or run via pipx/uvx).
  • Auth: run gh auth login then add --use-gh, or set GITHUB_TOKEN (needs Actions: read).
  • Jump to a page: add --path reference/index.html.
  • Latest vs exact: --pr <n> grabs the newest build; --run <id> pins this one.
  • Re-download: --refresh ignores the local cache.

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