Skip to content

Commit 1991503

Browse files
committed
fix: correct event-handler signature
1 parent 9335ab9 commit 1991503

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/sphinx_book_theme/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ def check_deprecation_keys(app):
179179
)
180180

181181

182-
def update_general_config(app):
182+
def update_general_config(app, config):
183183
theme_dir = get_html_theme_path()
184184

185-
app.config.templates_path.append(os.path.join(theme_dir, "components"))
185+
config.templates_path.append(os.path.join(theme_dir, "components"))
186186

187187

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

0 commit comments

Comments
 (0)