2024-07-20 17:29:49 -07:00
|
|
|
{{- $pageWantsAnchors := .Page.Params.renderHeadingAnchors | default true -}}
|
|
|
|
{{- $anchorEnabledForThisHeading := .Attributes.anchor | default true -}}
|
|
|
|
{{- $hasAnchor := and $pageWantsAnchors $anchorEnabledForThisHeading -}}
|
|
|
|
<h{{ .Level }} id="{{ .Anchor }}" class="heading{{ if $hasAnchor }} with-anchor{{ end }}">
|
|
|
|
{{- if $hasAnchor -}}
|
2024-07-27 09:29:19 -07:00
|
|
|
<span class="heading__anchor"><a href="#{{ .Anchor }}">#</a></span>
|
2024-07-06 10:18:51 -07:00
|
|
|
{{- end -}}
|
2024-07-27 09:29:19 -07:00
|
|
|
<span class="heading__content">{{ .Text | safeHTML }}</span>
|
2024-06-28 09:04:37 -07:00
|
|
|
</h{{ .Level }}>
|