zero-md icon indicating copy to clipboard operation
zero-md copied to clipboard

Display table of content TOC

Open damascene opened this issue 2 years ago • 3 comments

Thank you for this useful library.

Is there a simple way to display table of content in the page?

I see two closed PR related to TOC

https://github.com/zerodevx/zero-md/pull/27 https://github.com/zerodevx/zero-md/pull/28

damascene avatar Aug 21 '23 11:08 damascene

If you use VSCode, you can use Markdown All In One to create an automatically-updating table of contents within the markdown file.

alifeee avatar Sep 12 '23 23:09 alifeee

If you use VSCode Thank you for responding. I don't, seems the plugin you are refereeing to is written in Typescript. Would it be possible to port code from it?

damascene avatar Sep 13 '23 03:09 damascene

Thank you for responding. I don't, seems the plugin you are refereeing to is written in Typescript. Would it be possible to port code from it?

I'm not sure, but it looks like the logic is in toc.ts

You could also create a file to manually make a TOC. For example, I did this here with Python (this solution is in no way exhaustive, it was just a personal thing).

alifeee avatar Sep 14 '23 14:09 alifeee

Thank you for this useful library.

Is there a simple way to display table of content in the page?

I see two closed PR related to TOC

#27 #28

These PRs are made in error.

However, generating TOCs are probably not in the remit of this package. Closing for now, feel free to repoen.

zerodevx avatar May 10 '24 08:05 zerodevx