From 0523e1616d32182499a2dcd3fb98b38bd3c74041 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Tue, 29 Oct 2024 14:16:03 +0500 Subject: [PATCH] Explictly set html_baseurl on RTD. (#6507) --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index dcd2c9a3a..3de50e54e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,7 +8,7 @@ # # All configuration values have a default; values that are commented out # serve to show the default. - +import os import sys from pathlib import Path @@ -186,6 +186,8 @@ html_css_files = [ "custom.css", ] +# Set canonical URL from the Read the Docs Domain +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") # Options for LaTeX output # ------------------------