diff --git a/doc/utils/requirements.txt b/doc/utils/requirements.txt index be8aaed19c..df5d939365 100644 --- a/doc/utils/requirements.txt +++ b/doc/utils/requirements.txt @@ -1,6 +1,6 @@ -Sphinx < 6.0.0 +Sphinx sphinxcontrib-spelling -sphinxcontrib-jquery >=3.0.0 +sphinxcontrib-jquery git+https://github.com/akohlmey/sphinx-fortran@parallel-read sphinx_tabs breathe diff --git a/doc/utils/sphinx-config/_themes/lammps_theme/__init__.py b/doc/utils/sphinx-config/_themes/lammps_theme/__init__.py index 16935585b0..458d105363 100644 --- a/doc/utils/sphinx-config/_themes/lammps_theme/__init__.py +++ b/doc/utils/sphinx-config/_themes/lammps_theme/__init__.py @@ -12,7 +12,7 @@ from sphinx.locale import _ from sphinx.util.logging import getLogger -__version__ = '1.1.1' +__version__ = '1.2.0' __version_full__ = __version__ logger = getLogger(__name__) @@ -40,15 +40,24 @@ def extend_html_context(app, pagename, templatename, context, doctree): # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package def setup(app): if python_version[0] < 3: - logger.warning("Python 2 is deprecated with sphinx_rtd_theme, update to Python 3") + logger.warning("Python 2 is deprecated with lammps_theme, update to Python 3") app.require_sphinx('1.6') if sphinx_version <= (2, 0, 0): - logger.warning("Sphinx 1.x is deprecated with sphinx_rtd_theme, update to Sphinx 2.x or greater") + logger.warning("Sphinx 1.x is deprecated with lammps_theme, update to Sphinx 2.x or greater") if not app.config.html_experimental_html5_writer: - logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme") + logger.warning("'html4_writer' is deprecated with lammps_theme") else: if app.config.html4_writer: - logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme") + logger.warning("'html4_writer' is deprecated with lammps_theme") + + # Since Sphinx 6, jquery isn't bundled anymore and we need to ensure that + # the sphinxcontrib-jquery extension is enabled. + # See: https://dev.readthedocs.io/en/latest/design/sphinx-jquery.html + if sphinx_version >= (6, 0, 0): + # Documentation of Sphinx guarantees that an extension is added and + # enabled at most once. + # See: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.setup_extension + app.setup_extension("sphinxcontrib.jquery") # Register the theme that can be referenced without adding a theme path app.add_html_theme('lammps_theme', path.abspath(path.dirname(__file__))) diff --git a/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html b/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html index f672cf097a..96ee0286bd 100644 --- a/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html +++ b/doc/utils/sphinx-config/_themes/lammps_theme/breadcrumbs.html @@ -22,7 +22,7 @@