Skip to content

Commit

Permalink
style: Specify ReadTheDocs custom domain name
Browse files Browse the repository at this point in the history
Specify the Read The Docs custom domain in the documentation config file.

Read the Docs is deprecating Sphinx context injection at build time starting Monday, Oct 7, 2024, so any custom domain specified in the Read the Docs admin needs to be defined in the configuration file.

Documentation:

  https://about.readthedocs.com/blog/2024/07/addons-by-default/
  • Loading branch information
thewtex committed Jul 18, 2024
1 parent 55dc91e commit 05cc828
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
copyright = f'{date.today().year}, NumFOCUS'
author = 'Matt McCormick'

# Define the canonical URL if you are using a custom domain on Read the Docs
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "wasm.itk.org")

html_context = {}
# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True

extensions = [
'sphinx.ext.napoleon',
'autodoc2',
Expand Down

0 comments on commit 05cc828

Please sign in to comment.