{{- $pageWantsAnchors := .Page.Params.renderHeadingAnchors | default true -}} {{- $anchorEnabledForThisHeading := .Attributes.anchor | default true -}} {{- $hasAnchor := and $pageWantsAnchors $anchorEnabledForThisHeading -}} {{- if $hasAnchor -}} {{ range seq .Level }}#{{ end }} {{- end -}} {{ .Text | safeHTML }}