Repository navigation
The docs site submits changed pages to IndexNow and carries the Yandex ownership tag - #610
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…covers renames and the description generator, and is tested end to end Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s on a build change, and fails loudly on a git error Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
6 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):
...
Why
The documentation site changes almost daily. Search engines that support IndexNow (a shared endpoint used by several engines) can index a changed page as soon as it's announced, instead of waiting for the next crawl. The site also needs to be verified in Yandex Webmaster, which, like Google, reads an ownership meta tag on the home page.
Scope and risk
scripts/docs_site/indexnow.py(new, standard library only): it maps the paths a push changed to the site URLs they're served at.docs/x/y.mdmaps to/loom/x/y/andindex.mdto its directory. A change to the site's build (mkdocs.yml, anything underscripts/docs_site/, orscripts/codegen/page_summary.py, which writes the descriptions and sidebar) changes every page, so it submits every page underdocs/, listed from the tree rather than read from a possibly cached live sitemap. The script posts the URLs to the IndexNow endpoint with the site's key, and does nothing when no page changed.docs/62c80f56ebfbf10ec60777aa18a08c66.txt: the IndexNow key file. It's named after its own content and served at the site root, so engines can check the key. It's public by design..github/workflows/docs-site.yml: a newindexnowjob afterdeploy, on main only, withactions: readadded to its permissions. It diffs from the head of the last successful push run on main (orHEAD~1when there is none), because a push can carry several commits and a pending run can be cancelled by a newer one. It uses--no-renames, so a moved page's old URL is announced too. The step runs underbashwithpipefail, so a failedgit difffails the job rather than submitting nothing, and paths are passed NUL-separated. It hascontinue-on-error, because a failed submission only delays indexing and must not mark the deploy failed. When the build changed, the deleted pages' URLs are kept alongside every page in the tree.scripts/docs_site/overrides/main.html: ayandex-verificationmeta tag beside Google's, on the home page only.docs/development/repository-guide.mdandscripts/__init__.py:scripts/docs_site/now also holds the IndexNow submission.Compatibility, rollout and rollback
Tests
tests/unit/test_docs_site_indexnow.py(new) checks:hostand under the key file's directory);main: it posts nothing for no changed page, and posts exactly the changed page's URL otherwise (with the request faked).mkdocs build --strictpasses; the key file is served at the site root, and the Yandex tag is onindex.htmlonly. The new test, the docs-site, public-copy, doc-link and agent-instruction tests, and the workflow and release tests pass (240 for the docs and copy set). Ruff is 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. Checked by hand: the IndexNow payload against the protocol's documented fields (host, key, keyLocation, urlList), the URL mapping against the built site, and the Yandex tag value against the one Yandex Webmaster issued.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed. (Docs-site tooling only: the tests above.)main; no merged migration is edited. (None.)frontend/changed. (Not changed.)docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code