Files
hugo/homepage/layouts/_default/_markup/render-heading.html
2026-05-25 22:53:28 +02:00

8 lines
235 B
HTML

{{ $class := "" }}
{{ if findRE "^(?:\\d+\\.)+\\s+" .Text 1 }}
{{ $class = "manual-number" }}
{{ end }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}"{{ with $class }} class="{{ . }}"{{ end }}>
{{ .Text | safeHTML }}
</h{{ .Level }}>