mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
Add anchor links for subheading
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user