-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show module functions and/or class methods in sidebar (autodoc) #842
Comments
This would be more of a Sphinx question. You can author your docs to use explicit headings, but if you want per-method/function granularity on headings/toc entries, you'd probably have to explicitly call autodoc on each function/method/etc and provide a heading manually. I don't believe there is an autodoc option for outputting the domain items (reST of python/etc functions/methods) with headings included. I'd look into Sphinx options and the autodoc & friends directives. |
So the sidebar will only pick headings, right? Because functions and methods do have an anchor. Would it be possible to customize the rtd theme on my end to make it add links to these anchors? |
Correct, but that is a Sphinx thing, not something particular with our theme. Immediately, I don't know of a why to do what you're looking for. There are some creative options that could involve extending the autodoc Sphinx roles/directives for the domain you're using, but you'll need to dive into Sphinx internals to figure that one out. |
@pawamoy I have the same requirement, did you find a solution for this with Sphinx? |
@AtmaMani not with Sphinx, no 😕 I switched to MkDocs and wrote for it an autodoc plugin which has this feature: mkdocstrings, and I'm very happy with it 🙂 |
(Not using bug template since it's more a question / feature request)
I'm not sure this is related to
sphinx_rtd_theme
orsphinx
itself. Asking anyway.I use
sphinx.ext.autodoc
features to add documentation for modules (and their members) and classes (and their members). I would like to show these members in the sidebar. Is this possible with the current theme, or would it require modification?I also posted the question on stackoverflow if you want more details: https://stackoverflow.com/questions/58486590/sphinx-sidebar-include-modules-functions-and-class-methods
The text was updated successfully, but these errors were encountered: