Skip to content

Commit

Permalink
Update conf.py, sphinx context injection deprecated in ReadTheDocs (#383
Browse files Browse the repository at this point in the history
)

* Update conf.py, sphinx context injection deprecated in ReadTheDocs

ReadTheDocs is deprecating sphinx context injection. See details at #382

* Update docs/conf.py, define html_context variable

Co-authored-by: jakirkham <[email protected]>

* Handle already defined `html_context`

---------

Co-authored-by: jakirkham <[email protected]>
  • Loading branch information
GenevieveBuckley and jakirkham authored Oct 3, 2024
1 parent 77a29ba commit cb1360a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@

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

# Set canonical URL from the Read the Docs Domain
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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'dask_sphinx_theme'
Expand Down

0 comments on commit cb1360a

Please sign in to comment.