Skip to content

Commit

Permalink
ci: define canonical url and context for rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfischer committed Jul 26, 2024
1 parent 1b56632 commit 6381b62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def canonical_url() -> str:
html_static_path = ["_static"]
html_theme = "sphinx_rtd_theme"
html_title = f"{project} v{release}"
# define canonical URL for Read the Docs custom domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
if os.environ.get("READTHEDOCS", "") == "True":
if "html_context" not in globals():
html_context = {}
# tell Jinja2 the build is running on Read the Docs
html_context["READTHEDOCS"] = True


linkcheck_allowed_redirects = {
Expand Down

0 comments on commit 6381b62

Please sign in to comment.