Skip to content

Commit

Permalink
Add settings that used to be automatically injected by RTD (#15)
Browse files Browse the repository at this point in the history
Following the advice in [1], add code to the configuration file that
readthedocs used to inject automatically but will no longer.

[1] https://about.readthedocs.com/blog/2024/07/addons-by-default/
  • Loading branch information
cquammen authored Sep 6, 2024
1 parent 3d204b1 commit b736a3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration


# Define the canonical URL if you are using a custom domain on Read the Docs
import os
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

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
# ones.
Expand Down

0 comments on commit b736a3f

Please sign in to comment.