mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-17 23:13:11 +00:00
13 lines
554 B
HTML
13 lines
554 B
HTML
{{ $text := chomp .Text }}
|
|
{{ if site.Params.main.titleCase }}{{ $text = (title ($text | htmlUnescape)) | htmlEscape }}{{ end }}
|
|
|
|
{{ if and site.Params.navigation.anchor $text }}
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading">
|
|
{{- $text | safeHTML -}}
|
|
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
|
|
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
|
|
</a>
|
|
</h{{ .Level }}>
|
|
{{ else }}
|
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ $text | safeHTML }}</h{{ .Level }}>
|
|
{{ end }} |