-
Notifications
You must be signed in to change notification settings - Fork 317
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
Putting version-switcher
in Primary Sidebar results in Extension Error
#1511
Comments
The app.config.templates_path.append(str(theme_path / "components")) which alters the default search path order for templates, calculated in Per the
However, debugging but is messed up when it gets to the point of prepending explicit template paths: NOTE: I debug {
"version": "0.2.0",
"configurations": [
{
"name": "Sphinx Debugger",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/.venv/Scripts/sphinx-build.exe",
"args": ["-b", "html", "src", "build"],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/docs",
"justMyCode": false,
}
]
} and then running from the and have the following package versions:
|
Actually, it appears |
Just wanted to capture what's going on during a build, specifically this is run:
In this case, #conf.py
extensions - [
'sphinx_book_theme',
# not 'pydata_sphinx_theme',
...
] Starting from the
The |
It looks like this issue was fixed in app.connect("config-inited", update_general_config) but it looks like it was changed to a app.connect("builder-inited", update_general_config) This looks like it was a mistake. |
I can confirm reverting to:
and def update_general_config(app, config): # add config argument back
... fixes the problem. |
thanks for documenting your detective work @adam-grant-hendry! Is there a TL;DR for what we should do differently in this repo? Or in the end is the problem all on the sphinx-book-theme side? |
Thanks! (And welcome back!) I like to be as explicit as possible for myself and the community in case we ever need to reread this. TL;DR
NBIn the explanation below,
In my case, the only reason
So that the |
Following the Version Switcher Dropdowns instructions, I'm getting the following error when trying to place the version switcher in the primary sidebar:
The template
toggle-primary-sidebar.html
is defined in sphinx-book-theme, which inherits from pydata-sphinx-theme. It appears the method_remove_empty_templates
is intended forpydata-sphinx-theme
templates, but will check other templates that derive from it, which is causing this error (toggle-primary-sidebar.html
is not apydata-sphinx-theme
template).I'm not sure how to proceed. I've started an initial discussion (see #1473), but I'm still lost.
See also:
The full traceback is:
The text was updated successfully, but these errors were encountered: