Files
blog/themes/PaperMod/layouts/partials/anchored_headings.html
changsongd f18b114a90
All checks were successful
Gitea Actions Demo / build-and-deploy (push) Successful in 5m44s
add theme PaperMod
2025-05-27 20:06:18 +08:00

3 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 }}