{{ $id := .id | default (anchorize (plainify .text)) }}
<h{{ .level }} class="{{ .class }} scroll-mt-20 flex items-center gap-2" id="{{ $id }}">
  <a class="text-black dark:text-white no-underline hover:underline" href="#{{ $id }}">
    {{ .text }}
  </a>
  {{- with .tier }}
    {{- partial "components/badge.html" (dict "color" "blue" "content" . ) -}}
  {{- end }}
</h{{ .level }}>
