diff --git a/docs/README.md b/docs/README.md index 2e6a300..cceecee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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/ ; ``` diff --git a/docs/gen-sphinx-html.sh b/docs/gen-sphinx-html.sh index 11d7b9a..bbb4cdf 100755 --- a/docs/gen-sphinx-html.sh +++ b/docs/gen-sphinx-html.sh @@ -2,7 +2,7 @@ # 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; @@ -10,10 +10,17 @@ 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/; diff --git a/pyproject.toml b/pyproject.toml index dcdb51b..474ee5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", ]