Closed NiklasRosenstein closed 4 years ago
I'm running into this issue as well because it looks like the markdown that pydocmd generates uses html tags instead of markdown headers.
This looks like where it gets generated: https://github.com/NiklasRosenstein/pydoc-markdown/blob/master/pydocmd/document.py#L60.
Oh, I see in your change log that you did this intentionally: https://github.com/NiklasRosenstein/pydoc-markdown#v201. So the point was to make anchor links worth globally even if classes have duplicate names?
Pydoc-markdown v3 by default produces Markdown-style headers instead of HTML headers. Additionally it places an anchor before every header so that it doesn't have to rely on the header IDs that will be generated by the Markdown to HTML renderer when linking to different sections in the same file.
This is an issue with MkDocs, and maybe we can find a way to either get a patch into MkDocs or maybe there is already an option to enable that feature. Basically, if you use HTML header tags like
<h1>...</h1>
instead of the Markdown style (# ...
), the headers don't appear in the Table of Contents.