vanilla-hugo/layouts/_default/_markup/render-heading.html
Danila Fedorin 5b5b971538 Make headings clickable
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-24 19:53:17 -07:00

7 lines
193 B
HTML

{{- .Page.Scratch.SetInMap "definedSections" (printf "#%s" .Anchor) true -}}
<a href="#{{ .Anchor }}">
<h{{ .Level }} id="{{ .Anchor }}">
{{- .Text | safeHTML -}}
</h{{ .Level }}>
</a>