On Tuesday, 6 March 2012 07:47:59 UTC-5, Rita Morgan wrote:
>
> I made a change in my config.py
>
> # Custom sidebar templates, maps document names to template names.
> #html_sidebars = {}
> html_sidebars = {'localtoc.html'}
>
I /think/ that html_sidebars actually takes a list of dictionary values?
html_sidebars = { 'document_name' : [ 'list.html', 'of.html',
'template_names.html' ],
'another_doc_name' : [ 'template_name.html' ] }
A dictionary is a list of key-value pairs: in this case, it's using
"document names" as keys, and "list of templates" as values.
Your assignment just creates a set with a single value:
(['localtoc.html']), which Sphinx will deal with unpredictably.
I don't have any html_sidebar value at all, because I'm using a theme that
doesn't use the sidebar. But, I /think/ that if you're using a theme that
supports a sidebar (like the default one), and you want to avoid having the
search box show up in them, you first have to build an html_sidebar map
like this:
html_sidebars = { 'contents' : [ 'globaltoc.html' ],
'content/*' : [ 'localtoc.html' ] }
And you might also have to monkey with the theme's template itself to
prevent any insertion of a search bar into the HTML output (but I'm unsure
about that last part). Note that building the list for html_sidebars is
tricky -- you don't want to have the "document names" match twice for a
document, but you also want patterns that will match everything in your doc
set. I handled that issue by putting only a few "preface-y" type topic
files at the root level of my project, and sticking all the other document
files in subdirectories... this made it much easier to build groups of
document naming pattnerns like this for my project.
Hope this helps -- it's sort of the same as TP's answer, but maybe is a bit
more info on why things are working the way they're working?
--
Viktor
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sphinx-dev/-/fuLQUOdLttkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.