e.g. if the post content includes <h2>Foo bar</h2>, we want to transform it to <h2 id="foo-bar">Foo bar</h2>. Maybe even add one of those fancy copy-to-clipboard icons that appear on hover, like GitHub does:
markdown-to-html libraries often have a feature for this, but since we start with html, we'll need an html parser. In Clojure it would be pretty easy to use hickory + postwalk to replace any h1-6 nodes. However with babashka looks like we'll need to use pods? I've never used pods myself yet.
e.g. if the post content includes
<h2>Foo bar</h2>
, we want to transform it to<h2 id="foo-bar">Foo bar</h2>
. Maybe even add one of those fancy copy-to-clipboard icons that appear on hover, like GitHub does:markdown-to-html libraries often have a feature for this, but since we start with html, we'll need an html parser. In Clojure it would be pretty easy to use hickory + postwalk to replace any h1-6 nodes. However with babashka looks like we'll need to use pods? I've never used pods myself yet.