Skip to content

Commit e19fff5

Browse files
committed
Fix documentation build configuration
- Add html_context with versions list to prevent KeyError in Pallets theme - Configure html_theme_options with globaltoc_maxdepth to fix 404 page rendering - Upgrade Sphinx and documentation dependencies to latest versions - Resolves build failures on ReadTheDocs - Build docs on Ubuntu 24.04 and Python 3.12
1 parent f17b8d5 commit e19fff5

5 files changed

Lines changed: 45 additions & 35 deletions

File tree

.readthedocs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2
22
build:
3-
os: ubuntu-22.04
3+
os: ubuntu-24.04
44
tools:
5-
python: "3.11"
5+
python: "3.12"
66
python:
77
install:
88
- requirements: docs/requirements.txt
@@ -11,3 +11,4 @@ python:
1111
sphinx:
1212
builder: dirhtml
1313
fail_on_warning: true
14+
configuration: docs/conf.py

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
1.4.1 (unreleased)
55
------------------
66
- migrate from setup.py to pyproject.toml configuration
7+
- fix doc building on read the docs
78

89
1.4.0 (2023.10.03)
910
------------------

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
# a list of builtin themes.
3636
html_theme = 'flask'
3737

38+
# Theme options for the Pallets Flask theme
39+
html_theme_options = {
40+
'globaltoc_maxdepth': 2,
41+
}
42+
43+
# Context for the theme
44+
html_context = {
45+
'versions': [],
46+
}
47+
3848
# The name for this set of Sphinx documents. If None, it defaults to
3949
# "<project> v<release> documentation".
4050
# html_title = None

docs/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Sphinx
22
Pallets-Sphinx-Themes
3-
packaging < 22 # https://github.com/readthedocs/readthedocs.org/issues/9805
3+
packaging

docs/requirements.txt

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,60 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --output-file=/home/jugmac00/Projects/flask-reuploaded/docs/requirements.txt /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in
5+
# pip-compile --output-file=/home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.txt /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in
66
#
7-
alabaster==0.7.13
7+
alabaster==1.0.0
88
# via sphinx
9-
babel==2.13.0
9+
babel==2.18.0
1010
# via sphinx
11-
certifi==2023.7.22
11+
certifi==2026.1.4
1212
# via requests
13-
charset-normalizer==3.3.0
13+
charset-normalizer==3.4.4
1414
# via requests
15-
docutils==0.20.1
15+
docutils==0.22.4
1616
# via sphinx
17-
idna==3.4
17+
idna==3.11
1818
# via requests
1919
imagesize==1.4.1
2020
# via sphinx
21-
jinja2==3.1.2
21+
jinja2==3.1.6
2222
# via sphinx
23-
markupsafe==2.1.3
23+
markupsafe==3.0.3
2424
# via jinja2
25-
packaging==21.3
25+
packaging==26.0
2626
# via
27-
# -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in
27+
# -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in
2828
# pallets-sphinx-themes
2929
# sphinx
30-
pallets-sphinx-themes==2.1.1
31-
# via -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in
32-
pygments==2.16.1
30+
pallets-sphinx-themes==2.3.0
31+
# via -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in
32+
pygments==2.19.2
3333
# via sphinx
34-
pyparsing==3.1.1
35-
# via packaging
36-
requests==2.31.0
34+
requests==2.32.5
3735
# via sphinx
38-
snowballstemmer==2.2.0
36+
roman-numerals==4.1.0
3937
# via sphinx
40-
sphinx==7.2.6
38+
snowballstemmer==3.0.1
39+
# via sphinx
40+
sphinx==9.1.0
4141
# via
42-
# -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in
42+
# -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in
4343
# pallets-sphinx-themes
44-
# sphinxcontrib-applehelp
45-
# sphinxcontrib-devhelp
46-
# sphinxcontrib-htmlhelp
47-
# sphinxcontrib-qthelp
48-
# sphinxcontrib-serializinghtml
49-
sphinxcontrib-applehelp==1.0.7
44+
# sphinx-notfound-page
45+
sphinx-notfound-page==1.1.0
46+
# via pallets-sphinx-themes
47+
sphinxcontrib-applehelp==2.0.0
5048
# via sphinx
51-
sphinxcontrib-devhelp==1.0.5
49+
sphinxcontrib-devhelp==2.0.0
5250
# via sphinx
53-
sphinxcontrib-htmlhelp==2.0.4
51+
sphinxcontrib-htmlhelp==2.1.0
5452
# via sphinx
5553
sphinxcontrib-jsmath==1.0.1
5654
# via sphinx
57-
sphinxcontrib-qthelp==1.0.6
55+
sphinxcontrib-qthelp==2.0.0
5856
# via sphinx
59-
sphinxcontrib-serializinghtml==1.1.9
57+
sphinxcontrib-serializinghtml==2.0.0
6058
# via sphinx
61-
urllib3==2.0.6
59+
urllib3==2.6.3
6260
# via requests

0 commit comments

Comments
 (0)