seems that read-the-docs has changed their default themes, try to fix it.

This commit is contained in:
Frank Li 2024-03-01 11:58:14 +08:00
parent 457c3ec4a9
commit 184788a7e9
3 changed files with 8 additions and 7 deletions

View File

@ -30,6 +30,6 @@ sphinx:
# 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
python:
install:
- requirements: requirements.txt

View File

@ -19,10 +19,10 @@ pygments_style = 'sphinx'
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
sphinx-rtd-theme==2.0.0