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 015a9f4 commit 15660e8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@
# add these directories to sys.path here. If the directory is 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


# -- Project information -----------------------------------------------------
Expand Down

0 comments on commit 15660e8

Please sign in to comment.