diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py index b2a185f2..c118d2bb 100644 --- a/doc/manual/source/conf.py +++ b/doc/manual/source/conf.py @@ -12,7 +12,15 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os + +# Set canonical URL from the Read the Docs Domain +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": + html_context["READTHEDOCS"] = True + # import sys # sys.path.insert(0, os.path.abspath('.'))