cybercongress / cyb-ts

Immortal robot for the Great Web
https://cyb.ai
163 stars 40 forks source link

add the extension to autolink headers `/particle` #605

Open maxim-uvarov opened 2 years ago

maxim-uvarov commented 2 years ago

Long particles need a table of contents (TOC).

Now, it's impossible to add anchors even manually:

<a name="pookie"></a>
<a id="pookie"></a>

As they are stripped from the rendered page for security purposes, I guess.

Example markdown with such tags can be found here: https://cyb.ai/ipfs/QmaUrNTrfDeXJ9mKW8UK1ZLcTZX3arMqwENdwmkU97fLs2

Probably, rehype or remark plugin could solve the problem: https://github.com/rehypejs/rehype-autolink-headings

mastercyb commented 2 years ago

Also there is toc autogenerator as remark plugin. What should we choose?

maxim-uvarov commented 2 years ago

I would try toc autogenerator, as it is automatic.

saint-Joy commented 1 year ago

related to particle