Skip to content

Commit

Permalink
Merge pull request #817 from executablebooks/agoose77/fix-config-init…
Browse files Browse the repository at this point in the history
…ed-bug

fix: correct event-handler signature
  • Loading branch information
agoose77 authored Feb 13, 2024
2 parents 9335ab9 + 1991503 commit 7f2fcdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sphinx_book_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def check_deprecation_keys(app):
)


def update_general_config(app):
def update_general_config(app, config):
theme_dir = get_html_theme_path()

app.config.templates_path.append(os.path.join(theme_dir, "components"))
config.templates_path.append(os.path.join(theme_dir, "components"))


def update_templates(app, pagename, templatename, context, doctree):
Expand Down Expand Up @@ -230,7 +230,7 @@ def setup(app: Sphinx):
# Themes are initialised immediately before use, thus we cannot
# rely on an event to set the config - the theme config must be
# set in setup(app):
update_general_config(app)
update_general_config(app, app.config)
# Meanwhile, extensions are initialised _first_, and any config
# values set during setup() will be overwritten. We must therefore
# register the `config-inited` event to set these config options
Expand Down

0 comments on commit 7f2fcdb

Please sign in to comment.