Skip to content

The docs site submits changed pages to IndexNow and carries the Yandex ownership tag - #610

Merged
zlareb1 merged 4 commits into
mainfrom
docs-site/indexnow
Nov 13, 2026
Merged

zlareb1 merged 4 commits into
mainfrom
docs-site/indexnow

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 13, 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):

...

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.md maps to /loom/x/y/ and index.md to its directory. A change to the site's build (mkdocs.yml, anything under scripts/docs_site/, or scripts/codegen/page_summary.py, which writes the descriptions and sidebar) changes every page, so it submits every page under docs/, 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 new indexnow job after deploy, on main only, with actions: read added to its permissions. It diffs from the head of the last successful push run on main (or HEAD~1 when 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 under bash with pipefail, so a failed git diff fails the job rather than submitting nothing, and paths are passed NUL-separated. It has continue-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: a yandex-verification meta tag beside Google's, on the home page only.
  • docs/development/repository-guide.md and scripts/__init__.py: scripts/docs_site/ now also holds the IndexNow submission.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: after the deploy, press Check in Yandex Webmaster.
  • Rollback: revert. Removing the key file stops engines accepting submissions.

Tests

tests/unit/test_docs_site_indexnow.py (new) checks:

  • the path-to-URL mapping (pages, index pages, non-pages);
  • that only changed pages are submitted unless the build changed, and every page when it did (for each of the three build inputs);
  • the key file and the protocol's scope rule (every URL on host and 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 --strict passes; the key file is served at the site root, and the Yandex tag is on index.html only. 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 typecheck and make test-unit pass; the integration suite passes if server behaviour changed. (Docs-site tooling only: the tests above.)
  • Generated files are regenerated in this PR, not by hand. (None affected.)
  • A new migration is additive and numbered after the latest on main; no merged migration is edited. (None.)
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version. (None.)
  • The frontend builds and its tests pass, if frontend/ changed. (Not changed.)
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 4 commits November 13, 2026 10:25
…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]>
@zlareb1
zlareb1 merged commit 4a62c40 into main Nov 13, 2026
41 checks passed
@zlareb1
zlareb1 deleted the docs-site/indexnow branch November 13, 2026 10:39
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