pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.14k stars 146 forks source link

Support for headings to organize functions into sections #422

Open AlexAtCCRI opened 1 year ago

AlexAtCCRI commented 1 year ago

firstly, this program is awesome. thank you.

this may be asking too much from pdoc3, but in my code i usually have comment sections which are like markdown headings to organize the functions. kind of like a module-level doc-string. is there anyway to implement this with pdoc? i dont want to explicitly write a list of functions like i have to do with sphinx, because thats annoying, and easy to forget some.

example use case is a simple project with little more than a __init__.py. but with many functions it is nice to have headings to organise them. thoughts?

kernc commented 1 day ago

thoughts?

You can use --config sort_identifiers=False or similar to keep your customized order.

Other than that, I suggest writing an introductory section with desired listings in the module docstring.