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 aeae7c3 commit 18da277
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 @@ -14,8 +14,6 @@
# 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('.'))


Expand All @@ -24,6 +22,14 @@
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 = "Python for Data Science"
author = "Veit Schiele"
copyright = f"2019–2024, {author}"
Expand Down

0 comments on commit 18da277

Please sign in to comment.