diff --git a/docs/conf.py b/docs/conf.py index 9900eea1..1052772a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,6 +36,17 @@ # import oods.pygments import oods.sphinxtheme +# -- Read the Docs -------------------------------------------------------- + +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True + # -- General configuration ------------------------------------------------ html_context = {'bods_schema_version': '0.4'}