pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Feature request: link anchors for docstring sections

Open rossbar opened this issue 2 years ago • 1 comments

I did a quick scan of the issues and didn't see this proposed anywhere - apologies if I missed related discussions.

It would be a nice feature to have the docstring sections (e.g. Parameters, Notes, Examples, etc.) be linkable with a link anchor. Some docstrings are quite long, and a user may want to link to a component of the docstring, say the Examples. Having the ability to click on sections to have them snap to the top of the page, as well as share links with anchors (e.g. my_docstring.html#examples) would be great.

rossbar avatar Apr 13 '22 00:04 rossbar

I looked at this issue, That won't be so complicated to add a caption "#" but autosummary is generating all the doctrisngs section as dt without adding any Id to the DOM elements. Maybe this should be handled at a higher level (Sphinx) ?

12rambau avatar Jun 06 '22 08:06 12rambau

I will close this one as it cannot be handled easily from the theme itself. If you find a hack from your side please fill free to share it in the comment section

12rambau avatar Sep 26 '22 16:09 12rambau