diff --git a/docs/conf.py b/docs/conf.py index a5dec5e..da12f26 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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: