diff --git a/src/furo/__init__.py b/src/furo/__init__.py index 53afa2fb..7f64f1ad 100644 --- a/src/furo/__init__.py +++ b/src/furo/__init__.py @@ -168,10 +168,12 @@ def _html_page_context( context: Dict[str, Any], doctree: Any, ) -> None: - if app.config.html_theme != "furo": - return - - assert isinstance(app.builder, StandaloneHTMLBuilder) + if not isinstance(app.builder, StandaloneHTMLBuilder): + raise Exception( + "Furo is being used with a non-HTML builder. " + "If you're seeing this error, it is a symptom of a mistake in your " + "configuration." + ) if "css_files" in context: if "_static/styles/furo.css" not in context["css_files"]: @@ -219,8 +221,6 @@ def _html_page_context( def _builder_inited(app: sphinx.application.Sphinx) -> None: - if app.config.html_theme != "furo": - return if "furo" in app.config.extensions: raise Exception( "Did you list 'furo' in the `extensions` in conf.py? "