Skip to content

Commit

Permalink
🔧 Set canonical URL from the Read the Docs Domain
Browse files Browse the repository at this point in the history
  • Loading branch information
veit committed Jul 17, 2024
1 parent 372cc5f commit 4bd7f7e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath("."))

import os
import re

# 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

# -- General configuration ---------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down

0 comments on commit 4bd7f7e

Please sign in to comment.