Appearance of code block headings in the navigation sidebar
Closed this issue ยท 1 comments
I am trying to get the same beautifully looking sections in the navigation sidebar (left) as in the documentation of this very plugin : markdown_exec/ ๐ :
While there is an option for the headings to appear in the table of contents, I cannot find any documentation about the way this is done for the navigation sidebar, as seen in the API reference page. I can only trace and guess that this is generated via the gen_ref_nav.py script. Unless I miss something obvious, would it be considerable to expose this functionality directly to users of markdown-exec ?
Good investigation ๐
mkdocstrings now offers this feature (symbol types in headings and in the table of contents) for free (previously it was an Insiders feature), but the navigation is built using the gen_ref_nav.py
script, as you mention. Since mkdocstrings has zero control over which files are created, or their names, this feature (adding symbol types to the navigation) cannot be exposed, neither through mkdocstrings, nor markdown-exec.
If you want to add these symbols to your own navigation, you can follow what I do in gen_ref_nav.py
(look for mod_symbol
). I'm afraid there's no clean way to add such symbols in physical pages (non-generated ones) without mkdocs-literate-nav.
In the future, I want to create a new plugin that will ease the auto-generation of pages, and it will support symbols in the navigation too ๐