diff --git a/docs/conf.py b/docs/conf.py index e9d4506..ccbf46b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -106,5 +106,14 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# -- Read the Docs Specific Configuration +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") -# -- Extension configuration ------------------------------------------------- \ No newline at end of file +# 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 + +# -- Extension configuration -------------------------------------------------