liran-funaro / sphinx-markdown-builder

A Sphinx extension to add markdown generation support.
https://pypi.org/project/sphinx-markdown-builder
MIT License
41 stars 19 forks source link

Allow for adding and setting mkdocs style header entries #26

Open PlasmaHH opened 2 days ago

PlasmaHH commented 2 days ago

I am trying to integrate sphinx based documentation into an existing mkdocs project. This extenion is getting me really far already, but there are a couple of things that could need polishing, in this issue its about the mkdocs header.

mkdocs supports a variety of header fields, all at the start of the .md file like:

Title: title as shown in the navbar
hide: toc

and it would be great if we could somehow provide this extension with a dict (or maybe a hook or so) to output these things. In my use case I would like to have the hide: toc part in every file.

The title part however would be most useful if there was some format/template thing possible so I can e.g. say title: {fullname} (or whatever the variable would be) so it creates Title: name_of_function whereas the heading is currently maybe ### name_of_function( x: str = "" ) -> None (which would be too cluttered for the title in the navbar)