Describe the bug
context
When I use the sphinx-tabs extension and I include css or js in specific pages, this function removes it even if I intend for it to be included.
expectation
I expect sphinx-tabs to leave my included css/js alone. Rather than including sphinx-tabs assets globally and then removing them upon html-page-context if the page doesn't have any tabs directives, this package should only insert those assets if the page does have a tabs directive, not the other way around. This can also be done at html-page-context time.
bug
Instead, sphinx-tabs automatically removes all css/js unless it is included on every single page.
problem
This is a problem for people who want to include assets on specific pages to keep page load times down, but who also want to use tabs. Both sphinx docs and pydata-sphinx-theme docs suggest inserting css/js assets upon html-page-context, so the current behavior is extremely confusing because your assets get removed in the background, leaving you wondering how this is happening.
Reproduce the bug
Here's a small working example: https://github.com/peytondmurray/minimalsphinx/tree/per-page-css
You'll see if you run make html that the apidocs.html will only include the css if sphinx-tabs is disabled.
List your environment
No response
Describe the bug
context
When I use the
sphinx-tabsextension and I include css or js in specific pages, this function removes it even if I intend for it to be included.expectation
I expect
sphinx-tabsto leave my included css/js alone. Rather than includingsphinx-tabsassets globally and then removing them uponhtml-page-contextif the page doesn't have any tabs directives, this package should only insert those assets if the page does have a tabs directive, not the other way around. This can also be done athtml-page-contexttime.bug
Instead,
sphinx-tabsautomatically removes all css/js unless it is included on every single page.problem
This is a problem for people who want to include assets on specific pages to keep page load times down, but who also want to use tabs. Both sphinx docs and
pydata-sphinx-themedocs suggest inserting css/js assets uponhtml-page-context, so the current behavior is extremely confusing because your assets get removed in the background, leaving you wondering how this is happening.Reproduce the bug
Here's a small working example: https://github.com/peytondmurray/minimalsphinx/tree/per-page-css
You'll see if you run
make htmlthat theapidocs.htmlwill only include the css ifsphinx-tabsis disabled.List your environment
No response