Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,11 @@ git worktree add --detach /tmp/datafusion-55.0.0 55.0.0
cd /tmp/datafusion-55.0.0/docs
DATAFUSION_DOCS_SOURCE="$PWD/source" DATAFUSION_DOCS_VERSION=55.0.0 \
SPHINXOPTS="-W -c $DATAFUSION_DOCS_OVERLAY" \
uv run --package datafusion-docs --with sphinx-sitemap ./build.sh
uv run --package datafusion-docs ./build.sh
cd -
```

Notes:

1. You need to use an absolute path to the overlay in your current checkout.
2. The `--with sphinx-sitemap` option supplies the sitemap extension for older tags.
Note: you need to use an absolute path to the overlay in your current checkout.

To preview the result, build the docs from your main checkout
(`uv run --package datafusion-docs ./build.sh` in `docs/`), copy the release
Expand Down
18 changes: 12 additions & 6 deletions docs/scripts/release/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
Loads ``conf.py`` from a``docs/source`` directory located at
``DATAFUSION_DOCS_SOURCE`` and overrides the following settings:
- the version string (``DATAFUSION_DOCS_VERSION``),
- the site base URL used for the sitemap
- the version switcher.
- the version switcher,
- the sitemap and canonical URL (both disabled, see below).

Why?

Expand Down Expand Up @@ -52,10 +52,16 @@
html_favicon = str(source / html_favicon)

version = release = os.environ["DATAFUSION_DOCS_VERSION"]
html_baseurl = f"https://datafusion.apache.org/versions/{version}/"
sitemap_url_scheme = "{link}"
if "sphinx_sitemap" not in extensions:
extensions.append("sphinx_sitemap")

# Only the development documentation at the site root should be indexed by
# search engines. Sphinx emits a `<link rel="canonical">` tag on every page
# when `html_baseurl` is set, and sphinx-sitemap uses the same setting to
# write `sitemap.xml`. With the tag's `html_baseurl` each versioned page would
# declare itself canonical and compete with the root copy of the same page,
# so clear it and skip the sitemap for release builds. The root `robots.txt`
# only references the root `sitemap.xml`.
html_baseurl = ""
extensions = [ext for ext in extensions if ext != "sphinx_sitemap"]
html_context = {**html_context, "github_repo": "datafusion", "github_version": version}
html_theme_options = {
**html_theme_options,
Expand Down
Loading