Summaries of module contents at top of each module html, done automatically

67 views
Skip to first unread message

johna318

unread,
Jan 25, 2019, 12:53:35 PM1/25/19
to sphinx-users

I’m a sphinx newbie and I’m now moving from autodoc to autosummary.  As of now I’m pretty confused about the latter.  


What I want to do is generate html files for each module in a large library such that each module html file contains a summary table at that lists all the global variables, functions and classes (including methods etc.) defined in the file, similarly to what Javadoc does, though probably in a simplified form. 


Further, I want to do this at the config and maybe template level, without having to explicitly list modules or items within modules – same as autodoc –, so that when I run sphinx-apidoc and sphinx it will find everything it needs to put in the summaries automatically.  I want this because the library is constantly evolving as new nodules are added to the library and new functions and methods are added to the modules.


Is this possible?  Or maybe better, how much of what I want can I get?  Also is there sample code out there that does what I describe or at least something similar to it.


-- John

Carl Gay

unread,
May 1, 2021, 11:22:29 AM5/1/21
to sphinx-users
I'm also looking for this. Essentially I want what http://golang.org/pkg/ has, where if you click through to one of the (auto-generated) packages, for example bytes, you can see the entire public API at a glance. From the Sphinx perspective I think this would mean treating directives like ".. func::" and ".. class::" as subheadings that get added to the table of contents. Any pointers? Is this something I could accomplish by modifying our domain code to somehow add ToC entries?

Komiya Takeshi

unread,
May 2, 2021, 2:08:23 AM5/2/21
to sphinx...@googlegroups.com
There is no good way to register the classes and functions to ToC.
Please generate a section for each entry as a workaround.

Thanks,
Takeshi KOMIYA

2021年5月2日(日) 0:22 Carl Gay <car...@gmail.com>:
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/d1234af5-aa4f-4a4e-8b5c-da57bf066472n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages