Repository navigation
The documentation builds as a site with page descriptions, a sitemap and structured data, ready for GitHub Pages - #588
Merged
Merged
Conversation
…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]>
… 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]>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
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 linellms.txtalready 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, somkdocs build --strictfails on a broken link.scripts/docs_site/hooks.py: the sidebar followsllms.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 leavesdocs/(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). Norobots.txtis 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, andSoftwareApplication/SoftwareSourceCodestructured data on the home page, with nooffersblock.scripts/docs_site/requirements.inandrequirements.txt: the builder (mkdocs-material9.6.23,mdx-truly-sane-lists1.3) and its dependencies, pinned with hashes, regenerated with theuv pip compilecommand in the lock file's header; installed with--require-hashes --no-deps --only-binary=:all:.scripts/codegen/page_summary.py(new):first_sentence,page_summaryand the section orderSECTIONS, moved out ofdocs_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 onellms.txtline (the Environment variables reference). Thefirst_sentencetest moves totests/unit/test_page_summary.py..github/workflows/docs-site.yml: builds on every pull request that touches the docs or the builder, and onmain; uploads the Pages artifact and publishes frommainonly, and only when the repository variableDOCS_SITE_ENABLEDistrue, 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 andmailto: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" addsmkdocs build --strict..gitignore:/site/. The structured data names the operating systems as Linux and macOS.docs/development/repository-guide.mdandscripts/__init__.py: where the site is built and whatscripts/docs_site/holds.mkdocs.ymlturns on the edit button (content.action.edit) thatedit_uripoints at.The site serves the English documentation only. No server code changes.
Compatibility, rollout and rollback
DOCS_SITE_ENABLED=true. The next push tomainpublishes https://clickhouse.github.io/loom/; then submit https://clickhouse.github.io/loom/sitemap.xml to the search engines' webmaster consoles.DOCS_SITE_ENABLEDto anything else to stop publishing.Tests
mkdocs build --stricton the pushed head: 0 warnings and 0 unrecognized links (about 7 s); every link leavingdocs/resolves to a GitHub URL; nested lists indocs/architecture/assistant.mdand the checklists indocs/development/adding-a-table.mdrender 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 lintpass on the touched files.docs/describe the system as it now is.🤖 Generated with Claude Code