On Sat, Jan 2, 2010 at 8:44 AM, Georg Brandl <[email protected]> wrote:
> Am 01.01.2010 16:48, schrieb Tarek Ziadé:
>> Hi,
>>
>> I was trying to add an sidebar in *all* pages, using html_sidebars.
>> I ended up adding in conf.py a loop that lists all files in my Sphinx
>> source directory, to  generate a dict for html_sidebars.
>>
>> Is there a simpler way to do this ? if not I would like to suggest
>> adding a glob-style pattern in html_sidebars, so one may
>> configure it like this:
>>
>> html_sidebars = {'*': 'my_sidebar.html'}   -> the side bar will be
>> added in all pages
>>
>> html_sidebars = {'foo*': 'my_sidebar.html'}   -> the side bar will be
>> added in all pages that starts with foo
>
> You're not the first to bring this up -- looks like there is really
> use for it...
>
> What would you propose for the case of multiple matching entries?

I see two options, I am not 100% sure about the logic behind side bars:

1/ If one page matches two sidebars, I would append them both in that page.
But in that case, I would also allow the values in the dict to be
lists, since several sidebars
would be allowed per page.

2/ if there should be only one bar per page, I'd display a warning and
keep the last match.

I am in favor of 1/ because it gives more flexibility and I can't see
any caveats

Tarek

-- 
Tarek Ziadé | http://ziade.org

--

You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
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.


Reply via email to