Skip to content

Commit bcbaa29

Browse files
committed
Fix broken Read the Docs build: install sphinx_rtd_theme
docs/conf.py requires sphinx_rtd_theme, but .readthedocs.yml never installed it - the requirements section was commented out and pointed at a nonexistent ex-docs/requirements.txt (the docs directory has always been docs/). Every RTD build has failed with ModuleNotFoundError: sphinx_rtd_theme as a result, including the just published v0.4.0 tag build. Verified locally: pip install -r docs/requirements.txt in a clean venv, then the same sphinx-build invocation RTD uses, builds cleanly.
1 parent 841c8a7 commit bcbaa29

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.readthedocs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ build:
1515
# rust: "1.64"
1616
# golang: "1.19"
1717

18-
# Build documentation in the ex-docs/ directory with Sphinx
18+
# Build documentation in the docs/ directory with Sphinx
1919
sphinx:
2020
configuration: docs/conf.py
2121

22-
# If using Sphinx, optionally build your ex-docs in additional formats such as PDF
22+
# If using Sphinx, optionally build your docs in additional formats such as PDF
2323
# formats:
2424
# - pdf
2525

26-
# Optionally declare the Python requirements required to build your ex-docs
27-
# python:
28-
# install:
29-
# - requirements: ex-docs/requirements.txt
26+
# Python requirements required to build the docs (sphinx_rtd_theme, used by
27+
# docs/conf.py, isn't installed by default - without this the build fails
28+
# with ModuleNotFoundError: sphinx_rtd_theme)
29+
python:
30+
install:
31+
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx
2+
sphinx_rtd_theme

0 commit comments

Comments
 (0)