Skip to content

Commit

Permalink
Add required Read the Docs v2 config file, switch to RTD theme
Browse files Browse the repository at this point in the history
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
  • Loading branch information
trynthink committed Sep 23, 2023
1 parent 012e208 commit 87568d7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .readthedocs.yaml
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# (Optional) Build docs in additional formats; Scout has historically offered PDF, ePub, and HTML
formats:
- pdf
- epub
- htmlzip

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
html_theme = 'alabaster'
else:
extensions = ["sphinx_rtd_theme", ]
html_theme = "sphinx_rtd_theme"

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

0 comments on commit 87568d7

Please sign in to comment.