Aidurber / obsidian-plugin-dynamic-toc

An Obsidian plugin for creating Tables of Contents that stay updated with your document
MIT License
269 stars 41 forks source link

Add option to switch between Obsidian and Github styles #47

Closed liang-0131 closed 2 years ago

liang-0131 commented 2 years ago

Thank you for the plugin, it's awesome!

I often work on Github docs and modified the plugin to support Github-styled TOC ([Some header](# some-header)). I think it would be nice to have an option to switch between Obsidian and Github styles.

Aidurber commented 2 years ago

@liang-0131 This plugin doesn't support the output of the markdown, it only works by leveraging the Obsidian markdown renderer. In other cases with external rendering support (see image), they work because things like Gitlab will take that token such as __TOC__ and render a table of contents themselves.

I'm afraid you're stuck with the output. You might have more luck with https://github.com/hipstersmoothie/obsidian-plugin-toc since you render the actual table of contents to the document. It's one of the tradeoffs we make when we want them to be dynamic.