Repository navigation
[doc] fix sphinx-sitemap output across versions - #63115
Merged
Merged
Conversation
Two compounding bugs were producing broken sitemap URLs of the form `https://docs.ray.io/en/latesten/<page>` on every Ray docs version: 1. `html_baseurl` lacked a trailing slash, so the language prefix ran together with the path: `/en/latest` + `en/` -> `/en/latesten/`. 2. sphinx-sitemap's default `sitemap_url_scheme = "{lang}{version}{link}"` prepends `en/` to every page path because `language = "en"` is set, but `html_baseurl` already encodes `/en/latest/`. So the language was doubled. Fix: - Add trailing slash to `html_baseurl`. - Override `sitemap_url_scheme = "{link}"` so lang/version isn't doubled. - Bump sphinx-sitemap from 2.5.1 to 2.9.0 (lock file updated to match). The override is the load-bearing fix; the version bump is hygiene. Once `latest` rebuilds, `https://docs.ray.io/sitemap.xml` should return real URLs that resolve, restoring sitemap-driven discovery across the site. DOC-867 in anyscale/docs Jira tracking. Diagnosis context: anyscale/docs:strategy/ray-docs/legacy-versions-aeo.md sections 3 and 12. Signed-off-by: Douglas Strodtman <[email protected]>
sphinx-sitemap 2.9.0 added sphinx-last-updated-by-git as a transitive
dependency. The previous lock-file edit (which manually added the
sphinx-sitemap 2.9.0 hashes) didn't carry the new transitive, so
RtD's --require-hashes pip install rejected the unpinned dep with:
ERROR: In --require-hashes mode, all requirements must have their
versions pinned with ==. These do not:
sphinx-last-updated-by-git from ...
Adds sphinx-last-updated-by-git==0.3.8 with both wheel and sdist
hashes from PyPI. Its only runtime dep is sphinx>=1.8, which is
already pinned in the lock, so no further transitive entries needed.
Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades the sphinx-sitemap dependency to version 2.9.0 and updates the documentation configuration to correctly handle URL generation by adding a trailing slash to html_baseurl and overriding the sitemap_url_scheme. I have no further feedback to provide as the changes are well-justified.
elliot-barn
approved these changes
May 4, 2026
raydepsets reported the lock file out of date in CI because the manual `sphinx-last-updated-by-git` addition didn't update the `# via` comment block of `sphinx==7.3.7`. In the canonical resolved graph for sphinx-sitemap 2.9.0: sphinx-sitemap -> sphinx-last-updated-by-git -> sphinx So sphinx's via list now includes sphinx-last-updated-by-git (direct parent of sphinx) and no longer includes sphinx-sitemap (now an indirect parent through sphinx-last-updated-by-git). Comment-only change matching the diff raydepsets produced. No package versions or hashes affected. Signed-off-by: Douglas Strodtman <[email protected]>
This was referenced May 5, 2026
elliot-barn
pushed a commit
that referenced
this pull request
May 5, 2026
…63130) ## Why Read the Docs serves `/llms.txt` and `/llms-full.txt` automatically from the default version's build output once those files are present. Ray docs don't currently emit them, so `https://docs.ray.io/llms.txt` 404s. This is the largest remaining agent-facing gap on `docs.ray.io` per Anyscale's agent-friendliness assessment. ## What Adds the [`sphinx-llms-txt`](https://github.com/jdillard/sphinx-llms-txt) extension so Sphinx generates `llms.txt` and `llms-full.txt` at build time. RtD then serves them at the domain root with no further config. Three files changed: - `doc/requirements-doc.txt`: add `sphinx-llms-txt==0.7.1`. - `doc/source/conf.py`: add `sphinx_llms_txt` to the `extensions` list. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment update on the `sphinx` package. The extension's only runtime dep is `sphinx`, already pinned, so no further transitives. ## Verification After this lands and `latest` rebuilds, the expected outcome: - `https://docs.ray.io/llms.txt` returns 200 with a markdown summary of the doc structure. - `https://docs.ray.io/llms-full.txt` returns 200 with the full corpus in reStructuredText. - Spot-check the generated `llms.txt` to confirm headers and links look sane. ## Extension diligence Picked `sphinx-llms-txt` (MIT) as the lighter shipping path. Active maintenance: 11 releases since May 2025, last commit March 2026. External contributors have landed PRs from Google (`kaycebasques`) and NVIDIA (`jacobtomlinson`). 30+ Python OSS projects use it including `scrapy/scrapy`, `apache/hamilton`, `plone/documentation`, `pola-rs/polars-cloud-client`, `NVIDIA-NeMo/Evaluator`, `wagtail/sphinx-wagtail-theme`, `requests-cache/requests-cache`, `pyrogram`. The heavier sibling [`NVIDIA/sphinx-llm`](https://github.com/NVIDIA/sphinx-llm) (Apache 2.0) also emits per-page markdown twins. The two extensions are designed to be complementary; we can adopt `sphinx-llm` later as a follow-up if per-page twins become worthwhile. ## Context Tracked under `DOC-875` in the anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (`DOC-849`). Lives alongside the recent sphinx-sitemap fix in #63115. --------- Signed-off-by: Douglas Strodtman <[email protected]>
Lucas61000
pushed a commit
to Lucas61000/ray
that referenced
this pull request
May 15, 2026
## Why `https://docs.ray.io/sitemap.xml` (and the per-version sitemaps under `/en/<version>/sitemap.xml`) currently emit URLs of the form `https://docs.ray.io/en/latesten/<page>` and 404 across every Ray docs version. Sitemap-driven discovery is dead at every version. This is a long-standing miscombination of two configuration bugs: 1. `html_baseurl` lacks a trailing slash: `"https://docs.ray.io/en/latest"`. 2. sphinx-sitemap's default `sitemap_url_scheme = "{lang}{version}{link}"` prepends `en/` to every page path because `language = "en"` is set in `conf.py`. But `html_baseurl` already encodes `/en/latest/`. So the language gets doubled. Both combine to produce `/en/latest` + `en/` + `<page>` = `/en/latesten/<page>`. ## What - Add trailing slash to `html_baseurl`. - Override `sitemap_url_scheme = "{link}"` so the language and version aren't doubled. Inline comment in `conf.py` explains why. - Bump `sphinx-sitemap` from 2.5.1 to 2.9.0 (lock file updated to match). The scheme override is the load-bearing fix; the version bump is hygiene. ## Verification After this lands and `latest` rebuilds, the expected outcome is: - `https://docs.ray.io/sitemap.xml` returns 200 with URLs that resolve. - A spot check of any 5-10 entries from the sitemap returns 200, not 404. - Per-version archives' sitemaps remain broken (they're frozen and not rebuilt). RtD serves a single top-level sitemap from the default version's build output, so legacy archives' sitemaps are crawler-irrelevant once `latest` is fixed. ## Context Tracked under `DOC-867` in anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (`DOC-849`). Strategy context lives in `anyscale/docs:strategy/ray-docs/legacy-versions-aeo.md` sections 3 (symptom audit) and 12 (rebuild-vs-no-rebuild dispatch). ## Risks - The `sitemap_url_scheme = "{link}"` override is unambiguous given the current `html_baseurl` shape. If `html_baseurl` is ever changed to omit `/en/<version>/`, the scheme would need to revert to the default to re-include language/version. Captured in the conf.py comment. - Dependency lock file was edited directly with the new wheel/sdist hashes from PyPI (sphinx-sitemap 2.9.0 has the same transitive dependency surface as 2.5.1). If `raydepsets` regeneration is preferred, the lock will be re-resolved cleanly. --------- Signed-off-by: Douglas Strodtman <[email protected]>
Lucas61000
pushed a commit
to Lucas61000/ray
that referenced
this pull request
May 15, 2026
…ay-project#63130) ## Why Read the Docs serves `/llms.txt` and `/llms-full.txt` automatically from the default version's build output once those files are present. Ray docs don't currently emit them, so `https://docs.ray.io/llms.txt` 404s. This is the largest remaining agent-facing gap on `docs.ray.io` per Anyscale's agent-friendliness assessment. ## What Adds the [`sphinx-llms-txt`](https://github.com/jdillard/sphinx-llms-txt) extension so Sphinx generates `llms.txt` and `llms-full.txt` at build time. RtD then serves them at the domain root with no further config. Three files changed: - `doc/requirements-doc.txt`: add `sphinx-llms-txt==0.7.1`. - `doc/source/conf.py`: add `sphinx_llms_txt` to the `extensions` list. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment update on the `sphinx` package. The extension's only runtime dep is `sphinx`, already pinned, so no further transitives. ## Verification After this lands and `latest` rebuilds, the expected outcome: - `https://docs.ray.io/llms.txt` returns 200 with a markdown summary of the doc structure. - `https://docs.ray.io/llms-full.txt` returns 200 with the full corpus in reStructuredText. - Spot-check the generated `llms.txt` to confirm headers and links look sane. ## Extension diligence Picked `sphinx-llms-txt` (MIT) as the lighter shipping path. Active maintenance: 11 releases since May 2025, last commit March 2026. External contributors have landed PRs from Google (`kaycebasques`) and NVIDIA (`jacobtomlinson`). 30+ Python OSS projects use it including `scrapy/scrapy`, `apache/hamilton`, `plone/documentation`, `pola-rs/polars-cloud-client`, `NVIDIA-NeMo/Evaluator`, `wagtail/sphinx-wagtail-theme`, `requests-cache/requests-cache`, `pyrogram`. The heavier sibling [`NVIDIA/sphinx-llm`](https://github.com/NVIDIA/sphinx-llm) (Apache 2.0) also emits per-page markdown twins. The two extensions are designed to be complementary; we can adopt `sphinx-llm` later as a follow-up if per-page twins become worthwhile. ## Context Tracked under `DOC-875` in the anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (`DOC-849`). Lives alongside the recent sphinx-sitemap fix in ray-project#63115. --------- Signed-off-by: Douglas Strodtman <[email protected]>
alexandrplashchinsky
pushed a commit
to alexandrplashchinsky/ray-alex
that referenced
this pull request
May 29, 2026
## Why `https://docs.ray.io/sitemap.xml` (and the per-version sitemaps under `/en/<version>/sitemap.xml`) currently emit URLs of the form `https://docs.ray.io/en/latesten/<page>` and 404 across every Ray docs version. Sitemap-driven discovery is dead at every version. This is a long-standing miscombination of two configuration bugs: 1. `html_baseurl` lacks a trailing slash: `"https://docs.ray.io/en/latest"`. 2. sphinx-sitemap's default `sitemap_url_scheme = "{lang}{version}{link}"` prepends `en/` to every page path because `language = "en"` is set in `conf.py`. But `html_baseurl` already encodes `/en/latest/`. So the language gets doubled. Both combine to produce `/en/latest` + `en/` + `<page>` = `/en/latesten/<page>`. ## What - Add trailing slash to `html_baseurl`. - Override `sitemap_url_scheme = "{link}"` so the language and version aren't doubled. Inline comment in `conf.py` explains why. - Bump `sphinx-sitemap` from 2.5.1 to 2.9.0 (lock file updated to match). The scheme override is the load-bearing fix; the version bump is hygiene. ## Verification After this lands and `latest` rebuilds, the expected outcome is: - `https://docs.ray.io/sitemap.xml` returns 200 with URLs that resolve. - A spot check of any 5-10 entries from the sitemap returns 200, not 404. - Per-version archives' sitemaps remain broken (they're frozen and not rebuilt). RtD serves a single top-level sitemap from the default version's build output, so legacy archives' sitemaps are crawler-irrelevant once `latest` is fixed. ## Context Tracked under `DOC-867` in anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (`DOC-849`). Strategy context lives in `anyscale/docs:strategy/ray-docs/legacy-versions-aeo.md` sections 3 (symptom audit) and 12 (rebuild-vs-no-rebuild dispatch). ## Risks - The `sitemap_url_scheme = "{link}"` override is unambiguous given the current `html_baseurl` shape. If `html_baseurl` is ever changed to omit `/en/<version>/`, the scheme would need to revert to the default to re-include language/version. Captured in the conf.py comment. - Dependency lock file was edited directly with the new wheel/sdist hashes from PyPI (sphinx-sitemap 2.9.0 has the same transitive dependency surface as 2.5.1). If `raydepsets` regeneration is preferred, the lock will be re-resolved cleanly. --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>
alexandrplashchinsky
pushed a commit
to alexandrplashchinsky/ray-alex
that referenced
this pull request
May 29, 2026
…ay-project#63130) ## Why Read the Docs serves `/llms.txt` and `/llms-full.txt` automatically from the default version's build output once those files are present. Ray docs don't currently emit them, so `https://docs.ray.io/llms.txt` 404s. This is the largest remaining agent-facing gap on `docs.ray.io` per Anyscale's agent-friendliness assessment. ## What Adds the [`sphinx-llms-txt`](https://github.com/jdillard/sphinx-llms-txt) extension so Sphinx generates `llms.txt` and `llms-full.txt` at build time. RtD then serves them at the domain root with no further config. Three files changed: - `doc/requirements-doc.txt`: add `sphinx-llms-txt==0.7.1`. - `doc/source/conf.py`: add `sphinx_llms_txt` to the `extensions` list. - `python/deplocks/docs/docbuild_depset_py3.10.lock`: package entry plus via-comment update on the `sphinx` package. The extension's only runtime dep is `sphinx`, already pinned, so no further transitives. ## Verification After this lands and `latest` rebuilds, the expected outcome: - `https://docs.ray.io/llms.txt` returns 200 with a markdown summary of the doc structure. - `https://docs.ray.io/llms-full.txt` returns 200 with the full corpus in reStructuredText. - Spot-check the generated `llms.txt` to confirm headers and links look sane. ## Extension diligence Picked `sphinx-llms-txt` (MIT) as the lighter shipping path. Active maintenance: 11 releases since May 2025, last commit March 2026. External contributors have landed PRs from Google (`kaycebasques`) and NVIDIA (`jacobtomlinson`). 30+ Python OSS projects use it including `scrapy/scrapy`, `apache/hamilton`, `plone/documentation`, `pola-rs/polars-cloud-client`, `NVIDIA-NeMo/Evaluator`, `wagtail/sphinx-wagtail-theme`, `requests-cache/requests-cache`, `pyrogram`. The heavier sibling [`NVIDIA/sphinx-llm`](https://github.com/NVIDIA/sphinx-llm) (Apache 2.0) also emits per-page markdown twins. The two extensions are designed to be complementary; we can adopt `sphinx-llm` later as a follow-up if per-page twins become worthwhile. ## Context Tracked under `DOC-875` in the anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (`DOC-849`). Lives alongside the recent sphinx-sitemap fix in ray-project#63115. --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>
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.
Why
https://docs.ray.io/sitemap.xml(and the per-version sitemaps under/en/<version>/sitemap.xml) currently emit URLs of the formhttps://docs.ray.io/en/latesten/<page>and 404 across every Ray docs version. Sitemap-driven discovery is dead at every version. This is a long-standing miscombination of two configuration bugs:html_baseurllacks a trailing slash:"https://docs.ray.io/en/latest".sitemap_url_scheme = "{lang}{version}{link}"prependsen/to every page path becauselanguage = "en"is set inconf.py. Buthtml_baseurlalready encodes/en/latest/. So the language gets doubled.Both combine to produce
/en/latest+en/+<page>=/en/latesten/<page>.What
html_baseurl.sitemap_url_scheme = "{link}"so the language and version aren't doubled. Inline comment inconf.pyexplains why.sphinx-sitemapfrom 2.5.1 to 2.9.0 (lock file updated to match). The scheme override is the load-bearing fix; the version bump is hygiene.Verification
After this lands and
latestrebuilds, the expected outcome is:https://docs.ray.io/sitemap.xmlreturns 200 with URLs that resolve.latestis fixed.Context
Tracked under
DOC-867in anyscale/docs Jira (private). Part of a broader rebuild-free legacy-version fix sweep (DOC-849). Strategy context lives inanyscale/docs:strategy/ray-docs/legacy-versions-aeo.mdsections 3 (symptom audit) and 12 (rebuild-vs-no-rebuild dispatch).Risks
sitemap_url_scheme = "{link}"override is unambiguous given the currenthtml_baseurlshape. Ifhtml_baseurlis ever changed to omit/en/<version>/, the scheme would need to revert to the default to re-include language/version. Captured in the conf.py comment.raydepsetsregeneration is preferred, the lock will be re-resolved cleanly.