Hi, I think you need to use `:toctree:` option to generate contents from docstring automatically. But it is a bit complex usage. So please read the document of autosummary.
Thanks, Takeshi KOMIYA 2020年4月14日(火) 18:03 F H <beep...@gmail.com>: > > Hi, > > I am documenting some Python code with autodoc and autosummary. My rst-files > are being parsed into HTML without any errors or warnings, but in most > instances the links generated by the autosummary tables are broken (i.e. they > do not link to the full definition). > > I am not using automodule to document the members of a module, but the > respective directives for each member separately. But I would like to include > the module docstring and invoke for that the automodule directive without any > further arguments. This invocation seems to be the culprit for causing the > broken links, but only for sub-modules, not for the package module. As two > minified examples: > > The file for my package module, the links generated by the autosummary > directives do work here: > > some_package > ============ > > .. automodule:: some_package > > .. rubric:: Numeric Constants > .. autosummary:: > :nosignatures: > > some_package.some_numeric_constant > > .. rubric:: Type Constants > .. autosummary:: > :nosignatures: > > some_package.some_type_constant > > .. rubric:: Functions > .. autosummary:: > :nosignatures: > > some_package.some_function > > Numeric Constants > ----------------- > .. autodata:: some_package.some_numeric_constant > > Type Constants > -------------- > .. autodata:: some_package.some_type_constant > > Functions > --------- > .. autofunction:: some_package.some_function > > And here the file for a sub-module of that package, the links only work, when > I remove the automodule:: some_package.a_module directive. > > some_package.a_module > ===================== > > .. toctree:: > :hidden: > > some_class_page > > .. automodule:: some_package.a_module > > .. note:: > A note that contains a reference to the module itself > :mod:`some_package.a_module`. > > .. rubric:: Classes > > .. autosummary:: > :nosignatures: > > some_package.a_module.SomeClass > > .. rubric:: Functions > .. autosummary:: > :nosignatures: > > some_package.a_module.some_function > > Functions > --------- > .. autofunction:: some_package.a_module.some_function > > So, I assume the automodule directive does claim (for the lack of a better > word) the domain of my module. Is there a way to make it behave similar to > py::currentmodule? Any why is it working in my package module? > > Cheers and thanks for the help, > Ferdinand > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/98a000da-d14d-4c7d-b1b9-27327ad92180%40googlegroups.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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAM_Whzu-7h_FnXxEjcb%2Bcqx8WFQ1d5Np31EicbTLaCkpQ%40mail.gmail.com.