autodoc option to generate rst files with only module names as section headers

111 views
Skip to first unread message

Madhukar Baliga

unread,
Jun 9, 2014, 8:13:20 AM6/9/14
to sphinx...@googlegroups.com
Hi,

I am new to sphinx and am using it to document one of my python projects. I am using autodoc option to generate documentation for my project. I have a pretty long hierarchy for my modules. Something like this : 

source.abc.xyz.cde.xxx.yyy.config.group.resource

Because of this my sidebar links are too long and look very bad. I have used a sticky sidebar option but I still not satisfied.

Is there some option (for confy.py or other) to generate rst files where only module names are section headers and not the entire path :

For Ex : 

       my source.abc.xyz.cde.xxx.yyy.config.group.rst file should have 

       resource
       =======
            .. automodule:: source.abc.xyz.cde.xxx.yyy.config.group.resource
              :members:
              :undoc-members:
              :show-inheritance:

       instead of 

       source.abc.xyz.cde.xxx.yyy.config.group.resource
       ========================================
            .. automodule:: source.abc.xyz.cde.xxx.yyy.config.group.resource
              :members:
              :undoc-members:
              :show-inheritance:


Any help is appreciated. Thanks in advance.

-Maddy

Takayuki Shimizukawa

unread,
Jun 21, 2014, 6:04:33 AM6/21/14
to sphinx...@googlegroups.com
Hi,

How do you get the source.abc.xyz.cde.xxx.yyy.config.group.rst file?
If you are using autosummary, you can change the output by using
autosummary template as:
http://sphinx-doc.org/ext/autosummary.html#customizing-templates

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
> --
> 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 sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages