Files
paige-hugo/layouts/partials/paige/content.html
2023-01-21 23:43:53 -08:00

10 lines
336 B
HTML

{{ if .Content }}
<section class="paige-content">
{{ if .Scratch.Get "paige_show_full_pages" }}
{{ .Content }}
{{ else }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="paige-header-link" href="#${2}">#</a>${3}` | safeHTML }}
{{ end }}
</section>
{{ end }}