Skip to content

docs: do not emit canonical links or sitemap for versioned release docs - #26827

Draft
alamb wants to merge 1 commit into
apache:mainfrom
alamb:docs/no-canonical-old-versions
Draft

alamb wants to merge 1 commit into
apache:mainfrom
alamb:docs/no-canonical-old-versions

Conversation

@alamb

@alamb alamb commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Release documentation published under /versions/<version>/ is built with the overlay in docs/scripts/release/conf.py, which sets html_baseurl to the versioned prefix. Sphinx uses that setting to emit a <link rel="canonical"> tag on every page, so today each versioned copy of a page declares itself canonical and competes in search results with the development docs at the site root (for example, compare https://datafusion.apache.org/user-guide/configs.html and https://datafusion.apache.org/versions/55.1.0/user-guide/configs.html). Each versioned tree also ships its own sitemap.xml.

Only the development documentation at the site root should be indexed by search engines.

What changes are included in this PR?

  • Clear html_baseurl in the release overlay so release builds emit no <link rel="canonical"> tag
  • Drop sphinx_sitemap from release builds so no per-version sitemap.xml is written (the extension requires html_baseurl, and the root robots.txt only references the root sitemap anyway)
  • Remove the now unnecessary --with sphinx-sitemap note from the release instructions

The already published trees for 55.0.0 and 55.1.0 keep their current tags until they are rebuilt with the overlay.

Are these changes tested?

Built the 55.1.0 tag with the modified overlay (sphinx-build -c docs/scripts/release) and confirmed the output has no rel="canonical" link on any page, no sitemap.xml, and still has the version switcher configured with version_match of 55.1.0.

Are there any user-facing changes?

No. The rendered documentation looks the same; only the <head> metadata and the generated sitemap of versioned builds change.

Release documentation published under /versions/<version>/ currently
declares every page as its own canonical URL and ships its own
sitemap.xml, so search engines see each versioned copy as a competing
page. Only the development docs at the site root should be indexed.

Clear html_baseurl in the release overlay so Sphinx emits no
<link rel="canonical"> tag, and drop sphinx-sitemap from release builds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation development-process Related to development process of DataFusion labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant