Files
hugo-PaperMod/layouts/_partials/anchored_headings.html
T
Aditya Telange 87de3fb024 Implement new template system added with Hugo v0.146.0 (#1858)
* feat(layouts): move all files in layouts/_default up to the layouts/ root.

* feat(layouts): rename layouts/partials folder to layouts/_partials

* feat(layouts): rename layouts/shortcodes folder to layouts/_shortcodes

* feat(taxonomy): add new taxonomy layout template

A template named taxonomy.html used to be a candidate for both Page kind term and taxonomy, now it’s only considered for taxonomy.
2026-05-02 21:25:30 +05:30

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