Skip to content

Commit

Permalink
Docs: config.py changes to use readthedocs addons
Browse files Browse the repository at this point in the history
Instigated by https://about.readthedocs.com/blog/2024/07/addons-by-default/

Modified docs/conf.py to add lines suggested by the above blog post, in
preparation of the changes at read the docs. We also should opt-in to
the addon to ensure that this works ahead of the deprecation in October
  • Loading branch information
Matt Marshall committed Jul 17, 2024
1 parent 89dc23a commit 28e0556
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

## -- Read The Docs addons enabled by default
## -- this block is designed to keep the behaviour of the pre 2024-10 builds by defining html_baseurl inside this file, as read the docs are no longer injecting it.
## -- See https://about.readthedocs.com/blog/2024/07/addons-by-default/ for more details

html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# We also need to tell the Jinja2 templates that the build is running on Read The Docs
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True



# -- Options for HTML output ----------------------------------------------

Expand Down

0 comments on commit 28e0556

Please sign in to comment.