borkdude / quickblog

Light-weight static blog engine for Clojure and babashka
https://blog.michielborkent.nl/
MIT License
165 stars 28 forks source link

Add `:heading-anchors true` to the markdown compilation #82

Closed elken closed 9 months ago

elken commented 9 months ago

As noted here:

Specifying :heading-anchors will create anchors for the heading tags, eg:

(markdown/md-to-html-string "###foo bar BAz" :heading-anchors true)
<h3 id=\"foo&#95;bar&#95;baz\">foo bar BAz</h3>

Which allows for headings to be navigated to and, with some javascript, linked to (if desired this can also be added to the linked PR)