Skip to content

Commit

Permalink
build: Manually pull some RTD Context. (#281)
Browse files Browse the repository at this point in the history
See https://about.readthedocs.com/blog/2024/07/addons-by-default/ for details but
essentially RTD is changing how it's building docs and this will let us handle the
change gracefully.
  • Loading branch information
Feanil Patel authored Sep 26, 2024
1 parent 412bf57 commit fd96a72
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 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 os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

Expand Down Expand Up @@ -107,4 +107,14 @@
html_favicon = "https://logos.openedx.org/openedx-favicon.ico"


# -- Read the Docs Specific Configuration
# Define the canonical URL if you are using a custom domain on Read the Docs
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":
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True

# -- Extension configuration -------------------------------------------------

0 comments on commit fd96a72

Please sign in to comment.