Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: correct event-handler signature #817

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading