Sphinx: Make classes appear on TOC -


i'm starting document few python classes using ext.autodoc. have several *.rst files content such as

======== mymodule ========  .. automodule:: mymodule    .. autoclass:: myclassa        :members:    .. autoclass:: myclassb        :members: 

plus index.rst:

.. toctree::    :maxdepth: 2    mymodule 

'mymodule' shown in table of contents, i'd see classes in toc too:

  • mymodule
    • myclassa
    • myclassb

how can make sphinx create section each class? or there reason not so?

thanks

sphinx cannot create sections. you'll have add them in .rst file. this:

myclassa --------  .. autoclass:: myclassa    :members:  myclassb --------  .. autoclass:: myclassb    :members: 

for alternative suggestions might interesting, see these questions (and answers):


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -