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 -}}
|
|
|
|
<span class="heading__anchor">
|
|
|
|
<a href="#{{ .Anchor }}">{{ range seq .Level }}#{{ end }}</a>
|
|
|
|
</span>
|
2024-07-06 10:18:51 -07:00
|
|
|
{{- end -}}
|
2024-07-20 17:29:49 -07:00
|
|
|
{{ .Text | safeHTML }}
|
2024-06-28 09:04:37 -07:00
|
|
|
</h{{ .Level }}>
|