Skip to content

Commit d113543

Browse files
fix: revert to PR executablebooks#566 changes
- Change `update_general_config()` to run on `config-inited` event in `setup()` method - Add `config` parameter back to `update_general_config()` method
1 parent 3dd7770 commit d113543

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sphinx_book_theme/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def run(self):
188188
return nodes
189189

190190

191-
def update_general_config(app):
191+
def update_general_config(app, config):
192192
theme_dir = get_html_theme_path()
193193
# Update templates for sidebar. Needed for jupyter-book builds as jb
194194
# uses an instance of Sphinx class from sphinx.application to build the app.
@@ -235,7 +235,7 @@ def setup(app: Sphinx):
235235
app.connect("builder-inited", check_deprecation_keys)
236236
app.connect("builder-inited", update_sourcename)
237237
app.connect("builder-inited", update_context_with_repository_info)
238-
app.connect("builder-inited", update_general_config)
238+
app.connect("config-inited", update_general_config)
239239
app.connect("html-page-context", add_metadata_to_page)
240240
app.connect("html-page-context", hash_html_assets)
241241
app.connect("html-page-context", update_templates)

0 commit comments

Comments
 (0)