From f60ed393227ce9a768dcf6cc29085a6b0ed46d53 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 21 Apr 2023 20:24:38 -0600 Subject: [PATCH] docs: upgrade lammps_theme based on sphinx_rtd_theme 1.2.0 --- doc/utils/requirements.txt | 4 +- .../_themes/lammps_theme/__init__.py | 19 +- .../_themes/lammps_theme/breadcrumbs.html | 2 +- .../_themes/lammps_theme/footer.html | 1 - .../_themes/lammps_theme/layout.html | 43 ++-- .../locale/de/LC_MESSAGES/sphinx.mo | Bin 2087 -> 0 bytes .../locale/de/LC_MESSAGES/sphinx.po | 136 ------------- .../locale/en/LC_MESSAGES/sphinx.mo | Bin 457 -> 457 bytes .../locale/en/LC_MESSAGES/sphinx.po | 10 +- .../locale/es/LC_MESSAGES/sphinx.mo | Bin 2567 -> 0 bytes .../locale/es/LC_MESSAGES/sphinx.po | 169 --------------- .../locale/et/LC_MESSAGES/sphinx.mo | Bin 2380 -> 0 bytes .../locale/et/LC_MESSAGES/sphinx.po | 166 --------------- .../locale/fa_IR/LC_MESSAGES/sphinx.mo | Bin 2693 -> 0 bytes .../locale/fa_IR/LC_MESSAGES/sphinx.po | 161 --------------- .../locale/fr/LC_MESSAGES/sphinx.mo | Bin 2547 -> 0 bytes .../locale/fr/LC_MESSAGES/sphinx.po | 167 --------------- .../locale/hr/LC_MESSAGES/sphinx.mo | Bin 575 -> 0 bytes .../locale/hr/LC_MESSAGES/sphinx.po | 23 --- .../locale/hu/LC_MESSAGES/sphinx.mo | Bin 501 -> 0 bytes .../locale/hu/LC_MESSAGES/sphinx.po | 23 --- .../locale/it/LC_MESSAGES/sphinx.mo | Bin 2703 -> 0 bytes .../locale/it/LC_MESSAGES/sphinx.po | 192 ------------------ .../locale/lt/LC_MESSAGES/sphinx.mo | Bin 2750 -> 0 bytes .../locale/lt/LC_MESSAGES/sphinx.po | 188 ----------------- .../locale/nl/LC_MESSAGES/sphinx.mo | Bin 2549 -> 0 bytes .../locale/nl/LC_MESSAGES/sphinx.po | 188 ----------------- .../locale/pl/LC_MESSAGES/sphinx.mo | Bin 2339 -> 0 bytes .../locale/pl/LC_MESSAGES/sphinx.po | 137 ------------- .../locale/pt/LC_MESSAGES/sphinx.mo | Bin 2354 -> 0 bytes .../locale/pt/LC_MESSAGES/sphinx.po | 161 --------------- .../locale/pt_BR/LC_MESSAGES/sphinx.mo | Bin 2780 -> 0 bytes .../locale/pt_BR/LC_MESSAGES/sphinx.po | 191 ----------------- .../locale/ru/LC_MESSAGES/sphinx.mo | Bin 3449 -> 0 bytes .../locale/ru/LC_MESSAGES/sphinx.po | 189 ----------------- .../_themes/lammps_theme/locale/sphinx.pot | 16 +- .../locale/sv/LC_MESSAGES/sphinx.mo | Bin 2132 -> 0 bytes .../locale/sv/LC_MESSAGES/sphinx.po | 151 -------------- .../locale/tr/LC_MESSAGES/sphinx.mo | Bin 2117 -> 0 bytes .../locale/tr/LC_MESSAGES/sphinx.po | 143 ------------- .../locale/zh_CN/LC_MESSAGES/sphinx.mo | Bin 2511 -> 0 bytes .../locale/zh_CN/LC_MESSAGES/sphinx.po | 191 ----------------- .../_themes/lammps_theme/searchbox.html | 2 +- .../_themes/lammps_theme/static/css/theme.css | 2 +- doc/utils/sphinx-config/conf.py.in | 4 + 45 files changed, 54 insertions(+), 2625 deletions(-) delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/de/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/de/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/es/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/es/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/et/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/et/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/fa_IR/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/fa_IR/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/fr/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/fr/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/hr/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/hr/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/hu/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/hu/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/it/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/it/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/lt/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/lt/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/nl/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/nl/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pl/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pl/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pt/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pt/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pt_BR/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/pt_BR/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/ru/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/ru/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/sv/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/sv/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/tr/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/tr/LC_MESSAGES/sphinx.po delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/zh_CN/LC_MESSAGES/sphinx.mo delete mode 100644 doc/utils/sphinx-config/_themes/lammps_theme/locale/zh_CN/LC_MESSAGES/sphinx.po 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 @@