2

I'm trying to replicate how the ToC shows up in the sidebar on this page: http://matplotlib.sourceforge.net/sampledoc/extensions.html

...but I can't find any doc explaining how to or "Show Source" on the template itself.

Here is the template source they use on that tutorial: http://matplotlib.sourceforge.net/sampledoc/custom_look.html

It calls:

{% block sidebar1 %}{{ sidebar() }}{% endblock %}

But that doesn't seem to ToC my custom doc.

Update: To answer my own question, you just have to have sub-sections added to the same page and it will autogenerate those subsections as a ToC.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Cory
  • 604
  • 1
  • 6
  • 16

1 Answers1

1

The answer (see the question author's update) is that you only get a ToC in the sidebar if you have sections headings in your page. Without headings, no ToC is necessary according to Sphinx.

Reinout van Rees
  • 13,486
  • 2
  • 36
  • 68