I'm working on theming my documentation, and I'm trying to get sphinx to add a class to the <ul>
elements of the Table of Contents. Unfortunately, it looks like the HTML is generated just the same as any other list.
Is there a way to add a class to the TOC?
The class that I want to add (fyi) is nav nav-tabs nav-stacked
; I'm using a bootstrap theme.
Update: my current hack is to override localtoc.html
template to have
{{ toc|replace("<ul>", "<ul class='nav nav-tabs nav-stacked'>") }}
but it feels ugly...