Add required `.readthedocs.yaml`, `conf.py` and set `sphinx_rtd_theme`

RTD no longer automatically generates config files.

The `.readthedocs.yaml` is now required: https://blog.readthedocs.com/migrate-configuration-v2/

The `conf.py` for Sphinx is also required: https://blog.readthedocs.com/doctool-without-configuration-file/
- The previously automatically generated `conf.py` contained
  `sphinx_rtd_theme` -> in order to keep it we have to set it and add it
  as a requirement.
- The version field in `conf.py.in` remains uncofigured but I don't
  think it is a problem because it doesn't shows up in the html docs.
This commit is contained in:
Aleš Matěj 2024-02-09 10:01:45 +01:00 committed by kolage
parent 1032c2c316
commit 259e4c9d67
3 changed files with 18 additions and 1 deletions

16
.readthedocs.yaml Normal file
View File

@ -0,0 +1,16 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
pre_build:
- cp doc/conf.py.in doc/conf.py
sphinx:
configuration: doc/conf.py
python:
install:
- requirements: doc/requirements.txt

View File

@ -94,7 +94,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
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

1
doc/requirements.txt Normal file
View File

@ -0,0 +1 @@
sphinx_rtd_theme