{{ toc }} in localtoc.html includes headings of first level. I have only
one such heading per .rst file — the title of the page. And I don't want
local toc to include it. The desired functionality is provided by the
contents of the docutils:
.. contents::
:local:
:depth: 1
:backlinks: none
I'd like to call it instead of toc in localtoc.html. Here'a subclass I
need:
from docutils.parsers.rst import directivesfrom
docutils.parsers.rst.directives.parts import Contents
class localtoc(Contents):
option_spec = {'depth': 2,
'local': True,
'backlinks': None,
'class': directives.class_option}
def run(self):
rst = super(Contents, self).run()
return rst
But how do I call it from jinja during the sphinx build?
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.