Skip to content

Commit c380cb2

Browse files
authored
Add readthedocs additions to conf.py (#60)
1 parent 9a0f999 commit c380cb2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/source/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@
5151
"dissect_plugins",
5252
]
5353

54+
# Define the canonical URL if you are using a custom domain on Read the Docs
55+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
56+
57+
# Tell Jinja2 templates the build is running on Read the Docs
58+
if os.environ.get("READTHEDOCS", "") == "True":
59+
if "html_context" not in globals():
60+
html_context = {}
61+
html_context["READTHEDOCS"] = True
62+
5463
# Allow disabling of time consuming autoapi generation
5564
if not os.getenv("NO_AUTOAPI"):
5665
extensions.append("autoapi.extension")

0 commit comments

Comments
 (0)