Skip to content

Commit 4fd58be

Browse files
authored
Fix ReadTheDocs 'latest' build (#1292)
* Explicitly set html_theme_path * Add sphinx_rtd_theme extension * Add requirements.txt * Cleanup
1 parent 52c09fd commit 4fd58be

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.readthedocs.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ build:
55
tools:
66
python: "3.11"
77

8+
python:
9+
install:
10+
- requirements: Docs/sphinx_doc/requirements.txt
11+
812
sphinx:
913
configuration: Docs/sphinx_doc/conf.py
1014

1115
formats:
1216
- htmlzip
1317
# - pdf
14-
# - epub
18+
# - epub

Docs/sphinx_doc/conf.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = [ 'sphinx.ext.mathjax']
33+
extensions = [
34+
'sphinx.ext.mathjax',
35+
]
3436

3537
# Add any paths that contain templates here, relative to this directory.
3638
templates_path = ['_templates']
@@ -134,7 +136,9 @@
134136
# html_theme_options = {}
135137

136138
# Add any paths that contain custom themes here, relative to this directory.
137-
# html_theme_path = []
139+
# Add path to the RTD explicitly to robustify builds
140+
import sphinx_rtd_theme
141+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
138142

139143
# The name for this set of Sphinx documents.
140144
# "<project> v<release> documentation" by default.

Docs/sphinx_doc/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx-rtd-theme>=1.0.0

0 commit comments

Comments
 (0)