Skip to content

Commit

Permalink
Allow full rebuild when new config
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Jul 8, 2024
1 parent 5864ec1 commit a32bb68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sphinxnotes/fasthtml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.util import logging
from sphinx.environment import CONFIG_OK
from sphinx.environment import CONFIG_CHANGED, CONFIG_EXTENSIONS_CHANGED

if TYPE_CHECKING:
from sphinx.application import Sphinx
Expand Down Expand Up @@ -108,9 +108,9 @@ def _on_env_get_outdated(app: Sphinx, env: BuildEnvironment, added: set[str],
if not isinstance(app.builder, FastHTMLBuilder):
return []

# Config changes causes a fully rebuild, I don't want this.
if env.config_status != CONFIG_OK:
# Require the env to recalculate which docs should be rebuilt when the
# Do not trigger a full rebuild when config changed.
if env.config_status in [CONFIG_CHANGED, CONFIG_EXTENSIONS_CHANGED]:
# Require the env to re-calculate which docs should be rebuilt when the
# configuration has *NOT* changed.
added2, changed2, removed2 = env.get_outdated_files(config_changed=False)

Expand Down

0 comments on commit a32bb68

Please sign in to comment.