Skip to content

Commit

Permalink
Fix the check for HTML builders
Browse files Browse the repository at this point in the history
This makes it possible to use Furo with all HTML builder setups.
  • Loading branch information
pradyunsg committed Sep 9, 2023
1 parent ee2ab54 commit 5abeb9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/furo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ def _builder_inited(app: sphinx.application.Sphinx) -> None:
"and specifying it as an `html_theme` is sufficient."
)

if not isinstance(app.builder, StandaloneHTMLBuilder) or app.builder.name not in {
"html",
"dirhtml",
}:
looks_like_html_builder = isinstance(app.builder, StandaloneHTMLBuilder) or (
app.builder.name in {"html", "dirhtml"}
)
if not looks_like_html_builder:
raise ConfigError(
"Furo is being used as an extension in a non-HTML build. "
"This should not happen."
Expand Down

0 comments on commit 5abeb9f

Please sign in to comment.