Skip to content

The documentation builds as a site with page descriptions, a sitemap and structured data, ready for GitHub Pages - #588

Merged
zlareb1 merged 7 commits into
mainfrom
docs/site-pages
Nov 13, 2026
Merged

zlareb1 merged 7 commits into
mainfrom
docs/site-pages

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The documentation builds as a site from docs/ (MkDocs), with each page's first sentence as its search description, a sitemap and structured data; it publishes to GitHub Pages once Pages is turned on for the repository.

Why

The documentation is only browsable as GitHub blob pages, which search engines rank poorly and which carry no page description, sitemap or canonical URL. A site built from the same docs/ files gives every page its own title, a meta description taken from the first sentence (the line llms.txt already lists), canonical URLs and a sitemap, so a search for a use case can land on the page that answers it.

Scope and risk

  • mkdocs.yml: the site, theme and Markdown extensions (Mermaid fences; mdx_truly_sane_lists, which nests list content at 2 spaces as Prettier writes the docs, so nested lists and multi-paragraph items keep their structure; task lists; the edit button), with not-found, anchor and unrecognized links as warnings, so mkdocs build --strict fails on a broken link.
  • scripts/docs_site/hooks.py: the sidebar follows llms.txt's section order (Getting started, Use cases, Operations, …), with each section's index page first, then its pages (Overview and Quickstart first in Getting started), then its subsections, and loose top-level pages last; a wholly generated page ("not this page" / "This page is generated") gets no edit button, while a page with generated regions keeps it; each page's meta description is its first sentence (a trailing colon becomes a full stop), backticks dropped and HTML-escaped, and a front-matter description is escaped the same way (neither MkDocs nor the theme escapes it); the Open Graph title is escaped in the template; an inline link that leaves docs/ (source files, the README, llms.txt), including one whose text is a code span, is rewritten to the file on GitHub, and an image to its raw file, while fenced blocks (indented ones too) and code spans are left as written (one left-to-right tokenizer); an image inside a link is matched as the image; reference-style links are not rewritten (the docs use inline links). No robots.txt is written: crawlers read it only at the host root, and the site lives under /loom/, so the sitemap is submitted to search engines directly (operator step).
  • scripts/docs_site/overrides/main.html: Open Graph tags on every page, and SoftwareApplication / SoftwareSourceCode structured data on the home page, with no offers block.
  • scripts/docs_site/requirements.in and requirements.txt: the builder (mkdocs-material 9.6.23, mdx-truly-sane-lists 1.3) and its dependencies, pinned with hashes, regenerated with the uv pip compile command in the lock file's header; installed with --require-hashes --no-deps --only-binary=:all:.
  • scripts/codegen/page_summary.py (new): first_sentence, page_summary and the section order SECTIONS, moved out of docs_reference.py (which now uses them by these names) so the site build imports them without the server's dependencies. A summary is now cut after its links are reduced to their text, so a cut never lands inside a link; this changes one llms.txt line (the Environment variables reference). The first_sentence test moves to tests/unit/test_page_summary.py.
  • .github/workflows/docs-site.yml: builds on every pull request that touches the docs or the builder, and on main; uploads the Pages artifact and publishes from main only, and only when the repository variable DOCS_SITE_ENABLED is true, so the deploy job is skipped (not failed) until Pages is on. Runs are grouped per ref.
  • tests/unit/test_docs_site_hooks.py: on fixture pages, the escaped description, a front-matter description kept, the link rewrite (outside links, top-level, absolute and mailto: links, titled links, images, an image inside a link, code spans including wrapped and double-backtick ones, and backtick, tilde and indented fences left alone), a page with no description, the edit button on a generated page and the sidebar order.
  • docs/development/testing.md: the new workflow, beside the CI workflow's description.
  • docs/development/documentation-style.md: the first sentence is also the site's description, and "Before you push" adds mkdocs build --strict.
  • .gitignore: /site/. The structured data names the operating systems as Linux and macOS. docs/development/repository-guide.md and scripts/__init__.py: where the site is built and what scripts/docs_site/ holds. mkdocs.yml turns on the edit button (content.action.edit) that edit_uri points at.

The site serves the English documentation only. No server code changes.

Compatibility, rollout and rollback

Tests

  • mkdocs build --strict on the pushed head: 0 warnings and 0 unrecognized links (about 7 s); every link leaving docs/ resolves to a GitHub URL; nested lists in docs/architecture/assistant.md and the checklists in docs/development/adding-a-table.md render as lists and task lists.
  • pytest tests/unit/test_docs_site_hooks.py tests/unit/test_page_summary.py tests/unit/test_docs_reference.py tests/unit/test_test_inventory.py tests/unit/test_package_contracts.py tests/unit/test_exception_text_ratchet.py tests/unit/test_doc_links.py tests/unit/test_public_copy.py tests/unit/test_agent_instructions.py: passed.
  • python scripts/codegen/docs_reference.py --check: current. Ruff and Prettier clean.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code; the build was run locally on the full docs/ tree.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint pass on the touched files.
  • Docs under docs/ describe the system as it now is.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off.

🤖 Generated with Claude Code

zlareb1 and others added 3 commits November 12, 2026 23:02
…iptions, sitemap, robots.txt, structured data

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…write with raw images, no pricing in structured data, one name for the summary functions, requirements.in

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…re rewritten; indented fences kept; unrecognized links warn

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1 zlareb1 changed the title The documentation builds as a site with page descriptions, a sitemap and robots.txt, ready for GitHub Pages The documentation builds as a site with page descriptions, a sitemap and structured data, ready for GitHub Pages Nov 12, 2026
zlareb1 and others added 4 commits November 12, 2026 23:30
… link stays an image; wheels only; no robots.txt (crawlers read it at the host root only)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…button is on, scripts/docs_site is described

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…rated pages, summaries cut after links are stripped, wrapped code spans, CI paragraph

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…pages; edit button kept on partly generated pages; double-backtick spans

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 008e9ab into main Nov 13, 2026
73 of 75 checks passed
@zlareb1
zlareb1 deleted the docs/site-pages branch November 13, 2026 00:48
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