1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-24 05:02:10 +00:00
seirdy.one/layouts/_default/_markup/render-heading.html

12 lines
493 B
HTML
Raw Normal View History

{{- if and (eq .Level 2) (eq .Page.Section "posts") }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}-hd">{{ .Text | safeHTML -}}</h{{ .Level }}>
<a
id="{{ .Anchor | safeURL }}" href="#{{ .Anchor | safeURL }}"
aria-labelledby="{{ .Anchor | safeURL }}-prefix {{ .Anchor | safeURL }}-hd">
<span id="{{ .Anchor | safeURL }}-prefix">Permalink to section</span>
</a>
{{- else }}
{{- with . -}}
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML -}}</h{{ .Level }}>{{ end -}}
2022-04-26 00:29:34 +00:00
{{- end }}