NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
460 stars 105 forks source link

HTML header tags not in TOC #11

Closed NiklasRosenstein closed 4 years ago

NiklasRosenstein commented 7 years ago

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.

sverch commented 6 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.

sverch commented 6 years ago

This looks like where it gets generated: https://github.com/NiklasRosenstein/pydoc-markdown/blob/master/pydocmd/document.py#L60.

sverch commented 6 years ago

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?

NiklasRosenstein commented 4 years ago

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.