zerodevx / zero-md

Ridiculously simple zero-config markdown displayer
https://zerodevx.github.io/zero-md/
ISC License
437 stars 48 forks source link

Display table of content TOC #96

Closed damascene closed 6 months ago

damascene commented 1 year ago

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

alifeee commented 1 year ago

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

damascene commented 1 year ago

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?

alifeee commented 1 year ago

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).

zerodevx commented 6 months ago

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.