-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Configure sidebars for singlehtml #5246
Comments
I implemented this using the If the builder is an instance of the singlehtml builder and the config is set, it replaces I'd have to dig into more Sphinx internals to figure out how this would be implemented natively. |
…sidebars for singlehtml
…sidebars for singlehtml
Good idea! I just implemented it as #5261. |
…sidebars for singlehtml
Fix #5246: Add :confval:`singlehtml_sidebars` to configure sidebars for singlehtml
It's common to configure one set of sidebars for the index and another set for all other pages. For example, the index page will show project links in the sidebar and the full table of contents in the body, while other pages will show the local table of contents and navigation.
When using the singlehtml builder, the page name is always "index". It would be desirable to show the table of contents in the sidebar for this builder, since due to #2589 the table of contents is replaced by the pages and won't show up in the body. But since the page name is "index", it uses the index sidebars configured for the regular html builder.
A solution to this would be to add a
singlehtml_sidebars = []
configuration, and fall back to thehtml_sidebars
configuration if it's not present. It would also be good to be able to configure the default intheme.conf
like howhtml_sidebars
works.The text was updated successfully, but these errors were encountered: