feat: add anchor link to markdown heading (#992)

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/935
This commit is contained in:
Jimmy Cai 2024-03-27 16:08:19 +01:00 committed by GitHub
parent f8466d94d2
commit 539c39d69a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,4 @@
<h{{ .Level }} id="{{ .Anchor }}">
<a href="#{{ .Anchor }}">#</a>
{{ .Text | safeHTML }}
</h{{ .Level }}>