Files
hextra_mirror/layouts/_markup/render-heading.html
Paul Marrapese b7f4bffce6 feat(shortcode): added markdown attribute support for headers (#851)
docs: added "no-step-marker" example for steps
2025-10-11 23:13:04 +01:00

9 lines
380 B
HTML

<h{{ .Level }} {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
{{- .Text | safeHTML -}}
{{- if gt .Level 1 -}}
<span class="hx:absolute hx:-mt-20" id="{{ .Anchor | safeURL }}"></span>
<a href="#{{ .Anchor | safeURL }}" class="subheading-anchor" aria-label="Permalink for this section"></a>
{{- end -}}
</h{{ .Level }}>
{{- /* Drop trailing newlines */ -}}