Skip to content

Commit 87568d7

Browse files
committed
Add required Read the Docs v2 config file, switch to RTD theme
All Read the Docs (RTD) projects must have a configuration file v2 beginning September 25, 2023, or their documentation will no longer build on RTD servers. https://blog.readthedocs.com/migrate-configuration-v2/ RTD changed the default theme to Alabaster. Change back to the RTD theme. readthedocs/readthedocs.org#10692
1 parent 012e208 commit 87568d7

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.readthedocs.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file for Sphinx projects
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the OS, Python version, and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
# You can also specify other tool versions:
14+
# nodejs: "20"
15+
# rust: "1.70"
16+
# golang: "1.20"
17+
18+
# Build documentation in the "docs/" directory with Sphinx
19+
sphinx:
20+
configuration: docs/conf.py
21+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
22+
# builder: "dirhtml"
23+
# Fail on all warnings to avoid broken references
24+
# fail_on_warning: true
25+
26+
# (Optional) Build docs in additional formats; Scout has historically offered PDF, ePub, and HTML
27+
formats:
28+
- pdf
29+
- epub
30+
- htmlzip
31+
32+
# Optional but recommended, declare the Python requirements required
33+
# to build your documentation
34+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
35+
# python:
36+
# install:
37+
# - requirements: docs/requirements.txt

docs/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@
136136
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
137137
except ImportError:
138138
html_theme = 'alabaster'
139+
else:
140+
extensions = ["sphinx_rtd_theme", ]
141+
html_theme = "sphinx_rtd_theme"
139142

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

0 commit comments

Comments
 (0)