Skip to content

Commit

Permalink
fix: update docs conf.py for Read the Docs deprecation of Sphinx cont…
Browse files Browse the repository at this point in the history
…ext injection at build time
  • Loading branch information
iwyrkore committed Jul 17, 2024
1 parent 08aaade commit 0cdec0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,14 @@

# -- Options for EPUB output
epub_show_urls = 'footnote'

# Read the Docs deprecated of Sphinx context injection at build time
# so we set html_baseurl and html_context for compatibility:

# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

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

0 comments on commit 0cdec0e

Please sign in to comment.