Skip to content
Merged
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
11 changes: 3 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,11 @@

# Use RTD canonical URL to ensure duplicate pages have a specific canonical URL

html_baseurl = "https://canonical-kernel-docs.readthedocs-hosted.com/"
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "/")

# URL scheme. Add language and version scheme elements.
# When configured with RTD variables, check for RTD environment so manual runs succeed:
# sphinx-sitemap uses html_baseurl to generate the full URL for each page:

if 'READTHEDOCS_VERSION' in os.environ:
version = os.environ["READTHEDOCS_VERSION"]
sitemap_url_scheme = '{version}{link}'
else:
sitemap_url_scheme = 'MANUAL/{link}'
sitemap_url_scheme = '{link}'

# Include `lastmod` dates in the sitemap:

Expand Down
Loading