loseitIRC / loseitdocs

"Documentation" for the #loseit community
https://loseitirc.github.io/loseitdocs
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Automatic generation of anchors from Jekyll tags? #2

Open SnoopJ opened 6 years ago

SnoopJ commented 6 years ago

It would be great to somehow automatically generate anchors (for linking with <a href="#targetAnchor">go there</a>) for links and build a table of contents, but I'm not sure Jekyll has any support for this out of the box, and the plugins looked a little contrived when I took a peek.

SnoopJ commented 6 years ago

Might be doable with Kramdown's support for generating heading IDs and a table of contents. See the Kramdown docs. If we use a fourth heading level and hide the resulting tags with CSS, it seems like that'd be a neat solution.