0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-14 02:24:00 +01:00
Bootstrap/site/layouts/_default/_markup/render-heading.html
2024-03-05 20:34:45 +02:00

8 lines
338 B
HTML

{{- $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 }}>