blob: 86b8e35a72c2086c9ff66bf4b7a30fe8f23d8014 (
plain)
1
2
3
4
5
6
7
8
9
|
{{- $text := .Text -}}
{{- $hash := print (truncate 2 "" (sha256 .Page.RelPermalink)) (truncate 2 "" (sha256 $text)) -}}
{{- $id := print "heading:" $hash ":" .Anchor -}}
<h{{ .Level }} id="{{ $id | safeURL }}">
<a title="{{ $text | safeHTML }}" href="#{{ $id | safeURL }}">
{{ $text | safeHTML }}
</a>
</h{{ .Level }}>
|