Skip to content

Commit

Permalink
Docs: add environment variable (#337)
Browse files Browse the repository at this point in the history
The theme should include this into the `html_context` automatically, but
for some reason this is not working like that.
  • Loading branch information
humitos authored Jun 3, 2024
1 parent 7c3c358 commit 94f1d13
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
import os

project = 'Read the Docs Addons'
extensions = []
html_theme = 'furo'

html_context = {}

# NOTE: this should be done automatically by the theme,
# but for some reason it's not working as I expect.
# https://github.com/pradyunsg/furo/blob/0439e84b3c2c5b168f22ea2e93c867fd37911dfa/docs/conf.py#L134
if "READTHEDOCS" in os.environ:
html_context["READTHEDOCS"] = True

0 comments on commit 94f1d13

Please sign in to comment.