Skip to content

Commit c304046

Browse files
jeplerdpgeorge
authored andcommitted
docs: Always use sphinx_rtd_theme.
Without this, the wy-alert block pushed all the content to the right, making the locally built pages nearly illegible. Signed-off-by: Jeff Epler <jepler@gmail.com>
1 parent 2707ae0 commit c304046

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

docs/conf.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"sphinx.ext.todo",
5656
"sphinx.ext.coverage",
5757
"sphinxcontrib.jquery",
58+
"sphinx_rtd_theme",
5859
]
5960

6061
# Add any paths that contain templates here, relative to this directory.
@@ -128,20 +129,9 @@
128129

129130
# -- Options for HTML output ----------------------------------------------
130131

131-
# on_rtd is whether we are on readthedocs.org
132-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
132+
import sphinx_rtd_theme
133133

134-
if not on_rtd: # only import and set the theme if we're building docs locally
135-
try:
136-
import sphinx_rtd_theme
137-
138-
html_theme = "sphinx_rtd_theme"
139-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
140-
except:
141-
html_theme = "default"
142-
html_theme_path = ["."]
143-
else:
144-
html_theme_path = ["."]
134+
html_theme = "sphinx_rtd_theme"
145135

146136
# Theme options are theme-specific and customize the look and feel of a theme
147137
# further. For a list of options available for each theme, see the

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sphinx~=7.2.6
22
sphinxcontrib.jquery==4.1
3+
sphinx-rtd-theme==3.0.2

0 commit comments

Comments
 (0)