Skip to content

Commit

Permalink
Drop the check for the theme name
Browse files Browse the repository at this point in the history
This should not be necessary, given that we're validating that Furo
isn't added as an extension. Since that is enforced, it should not be
possible to misconfigure Furo and trigger a failure this way.
  • Loading branch information
pradyunsg committed Apr 13, 2023
1 parent 1b17d81 commit 48c0bf2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/furo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down Expand Up @@ -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? "
Expand Down

0 comments on commit 48c0bf2

Please sign in to comment.