diff --git a/docs/source/conf.py b/docs/source/conf.py index 0b75b59..96a90ae 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,7 +35,14 @@ "pynldas2": "PyNLDAS2", "hydrosignatures": "HydroSignatures", } - +# 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 --------------------------------------------------- extensions = [