Skip to content

Commit

Permalink
Bump to Sphinx 8.0.2 and update corresponding settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nth10sd committed Aug 19, 2024
1 parent a209d9f commit 1deb50a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Run the following on a clean repository to generate Sphinx HTML documentation in

To remove generated documentation, run:
```
rm -rf source/conf.py source/*.rst build/ source/_static/ source/_templates/
rmdir source/_static && rm -rf source/conf.py source/*.rst build/ source/_static/ source/_templates/ ;
```
17 changes: 12 additions & 5 deletions docs/gen-sphinx-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

# Bootstrap Sphinx
sphinx-quickstart --sep -p "startrepo" -a "FOO" -r "BAR" -l "en" \
--ext-autodoc --no-makefile --no-batchfile --no-use-make-mode;
--ext-autodoc --no-makefile --no-batchfile;

# Copy over the intended copy of conf.py
cp source/conf_correct.py source/conf.py;

# Generate Sphinx documentation
sphinx-apidoc -o source/ ../startrepo/;

# Add "modules" to portion of index.rst in the middle of several empty lines
tr '\n' '\f' < source/index.rst | \
sed 's/\f\f\f\f/\f\f modules\f\f/' | tr '\f' '\n' > source/index_new.rst;
mv source/index_new.rst source/index.rst;
# Add "modules" and "Indices and tables" section
cat << "EOF" >> source/index.rst
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
EOF

# Generate Sphinx HTML documentation
sphinx-build -W --keep-going -b html source/ build/html/;
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test = [
"pytest-xdist ~= 3.6.1",
"refurb ~= 2.0.0",
"ruff ~= 0.5.5",
"sphinx ~= 7.3.7",
"sphinx ~= 8.0.2",
"vulture ~= 2.11",
]

Expand Down

0 comments on commit 1deb50a

Please sign in to comment.