diff --git a/CHANGES.rst b/CHANGES.rst index 4e4f1f7..e2eba10 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,8 @@ Unreleased versions are no longer required for the banner to be correct. :pr:`117` - Generate 404 page using the sphinx-notfound-page extension. This fixes the URLs when the page is hosted so that it loads the CSS. :issue:`34` +- Remove handling for ``singlehtml_sidebars`` config which predated Sphinx's + support. :pr:`119` Version 2.1.3 diff --git a/src/pallets_sphinx_themes/__init__.py b/src/pallets_sphinx_themes/__init__.py index 7ec89aa..9294fe1 100644 --- a/src/pallets_sphinx_themes/__init__.py +++ b/src/pallets_sphinx_themes/__init__.py @@ -9,7 +9,6 @@ from sphinx.application import Sphinx from sphinx.builders.dirhtml import DirectoryHTMLBuilder -from sphinx.builders.singlehtml import SingleFileHTMLBuilder from sphinx.errors import ExtensionError from .theme_check import only_pallets_theme @@ -55,13 +54,6 @@ def setup(app): except ExtensionError: pass - try: - app.add_config_value("singlehtml_sidebars", None, "html") - except ExtensionError: - pass - else: - app.connect("builder-inited", singlehtml_sidebars) - from .themes import click as click_ext from .themes import jinja as jinja_ext @@ -124,19 +116,6 @@ def canonical_url(app: Sphinx, pagename, templatename, context, doctree): context["pageurl"] = base + target -@only_pallets_theme() -def singlehtml_sidebars(app): - """When using a ``singlehtml`` builder, replace the - ``html_sidebars`` config with ``singlehtml_sidebars``. This can be - used to change what sidebars are rendered for the single page called - ``"index"`` by the builder. - """ - if app.config.singlehtml_sidebars is not None and isinstance( - app.builder, SingleFileHTMLBuilder - ): - app.config.html_sidebars = app.config.singlehtml_sidebars - - @only_pallets_theme() def skip_internal(app, what, name, obj, skip, options): """Skip rendering autodoc when the docstring contains a line with