Plugin: Insta TOC

I’ve been wanting to create this for awhile, as I always enjoyed when the table of contents automatically updated as I added new headings within a VS Code markdown file. Hopefully some others can find some usefulness from it too.

It’s currently waiting for review to get submitted to the community plugins, however, you can start using it here:

rich text editor image

1 Like

Good, excellent idea, but I guess it needs some work. This is by inserting insta-toc in to existing note:

(ident was made automatically)

  • doesn’t make active links,
  • it gives me a whole path

And this is a test on a new note:

In the TOC, Heading 2 should be under the Heading 3.

It works nicely if you have the excellent Headings structure (1, 2, 3, …), but often you don’t have a “school sample” structure.

Cheers, Marko :nerd_face:

Thanks for bringing this to my attention.

I see where the problem lies; if the structure STARTS out of order (e.g., the file’s first heading is H2, the next is H1, etc.), the markdown does not render properly.

The objective with this plugin was to make it as simplistic and as unintensive as possible, which is why I was using Obsidian’s native MarkdownRenderer.render method for rendering the TOC.

Over the course of the next couple days I’ll have this fixed.

Fixed the indentation issue and added markdown link formatting:

1 Like