Skip to content

Commit

Permalink
Fixes in response to deprecation of Sphinx context injection on readt…
Browse files Browse the repository at this point in the history
…hedocs
  • Loading branch information
azvoleff committed Jul 16, 2024
1 parent 8ce69ac commit 2f846be
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import sys
from datetime import date

import sphinx_rtd_theme
Expand Down Expand Up @@ -96,7 +95,7 @@
# for a list of supported languages.
language = os.environ.get("READTHEDOCS_LANGUAGE")
if not language:
for t in tags:
for t in tags: # noqa: F821
if t.startswith("language_"):
language = t[9:]

Expand Down Expand Up @@ -159,6 +158,13 @@

# -- 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":
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 = "sphinx_rtd_theme"
Expand Down

0 comments on commit 2f846be

Please sign in to comment.