Socialify

Folder ..

Viewing render-heading.html
7 lines (7 loc) • 338.0 B

1
2
3
4
5
6
7
{{- $id := .Anchor | safeURL -}}
{{- $text := .Text | safeHTML -}}
<h{{ .Level }} id="{{ $id }}">{{ $text }}
{{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}}
<a class="anchor-link" href="#{{ $id }}" aria-label="Link to this section: {{ $text }}"></a>
{{- end -}}
</h{{ .Level }}>