Add header links

This commit is contained in:
Will Faught
2022-12-11 04:26:58 -08:00
parent da47e03ea9
commit a90d3c7061
3 changed files with 11 additions and 1 deletions

View File

@@ -14,5 +14,5 @@
<p class="text-center text-muted"><time datetime="{{ .PublishDate.Format `2006-01-02` }}">{{ .PublishDate.Format "January 2, 2006" }}</time></p>
{{ end }}
{{ if .Content }}
{{ .Content }}
{{ .Content | replaceRE `(<h[1-9] id="([^"]+)".+)(</h[1-9]+>)` `${1}<a class="headerlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
{{ end }}