blog-pika/www/layouts/_default/partials/anchored_headings.html
2024-06-23 02:28:11 +02:00

2 lines
212 B
HTML

{{- /* formats .Content headings by adding an anchor */ -}}
{{ . | replaceRE "(<h[1-6] id=\"([^\"]+)\".+)(</h[1-6]+>)" "${1}<a hidden class=\"anchor\" aria-hidden=\"true\" href=\"#${2}\">#</a>${3}" | safeHTML }}