Add anchor links for subheading

This commit is contained in:
Dave Gallant
2022-12-11 21:53:35 -05:00
parent b008b00e0c
commit 0515adbe60
64 changed files with 584 additions and 88 deletions

View File

@@ -1,3 +1,5 @@
<div class='container entry-content'>
{{ .Content }}
{{- with .Content -}}
{{ . | replaceRE "(<h[2-4] id=\"([^\"]+)\".+)(</h[2-4]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">#</a>${3}`| safeHTML }}
{{- end -}}
</div>