Skip to content

How to compile ToC without md.render? #75

@charnould

Description

@charnould

Hello,

First, thanks for the plugin. It works like a charm with markdown-it-anchor.
However, I got a small problem...

Is it possible to generate a ToC in a build script without having [[toc]] in my .md files?
If yes, how the function would look like?
(This function should return the html ToC snippet: <nav class="table-of-contents">...</nav>)

Why I'd like to do this?
Because of my html template, I'd like to paste html ToC in some outside CSS div.

Thanks a lot for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions