Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could the TOC not be made hierarchical? #1

Open
mmoser18 opened this issue Jul 23, 2024 · 1 comment
Open

Could the TOC not be made hierarchical? #1

mmoser18 opened this issue Jul 23, 2024 · 1 comment

Comments

@mmoser18
Copy link

mmoser18 commented Jul 23, 2024

I was seeking a version of the toc plugin that does not place the generated table of content at the begin of the resulting document but at a choosable position. I thus very much liked the feature that I can put a placeholder [[toc]] into my markdown file at a position of my liking and that this plugin then inserts the TOC there.
But why - for Christ's sake - it the TOC only a linear, non-hierarchical list and not a decent "normal" structured, hierarchical table of content (like the default rehype-toc produces)? Such a simplistic linear list makes this plugin useless for me. What a pity...

@naiyerasif
Copy link
Contributor

There's nothing stopping you to generate a hierarchical list. You can pass toc(headings) function in the options and generate the TOC howsoever you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants