add anchor icon to heading anchors

This commit is contained in:
Sophia Brandt
2020-01-17 13:11:41 +01:00
parent 48233660d8
commit 3aeb73a422
9 changed files with 29 additions and 261 deletions

View File

@ -28,7 +28,11 @@
{{ end }}
<div class="post-content">
{{ .Content }}
{{- with .Content -}}
<div>
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor"> 🔗&#xFE0E;</a> ${3}` | safeHTML }}
</div>
{{- end -}}
</div>
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">