diff --git a/doc/developer/conf.py b/doc/developer/conf.py index 495c604ae0..d158ded721 100644 --- a/doc/developer/conf.py +++ b/doc/developer/conf.py @@ -66,6 +66,13 @@ version = u"?.?" # The full version, including alpha/beta/rc tags. release = u"?.?-?" +# 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 + # ----------------------------------------------------------------------------- # Extract values from codebase for substitution into docs. diff --git a/doc/user/conf.py b/doc/user/conf.py index 728f9c9364..6d47b7e69c 100644 --- a/doc/user/conf.py +++ b/doc/user/conf.py @@ -65,6 +65,16 @@ version = u"?.?" # The full version, including alpha/beta/rc tags. release = u"?.?-?" +# RTD configuration + +# 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 + + # ----------------------------------------------------------------------------- # Extract values from codebase for substitution into docs.