Omit sub-h1 header links for full pages in list pages

This commit is contained in:
Will Faught
2022-12-19 21:02:03 -08:00
parent bf2ee25132
commit fa3ac706cd

View File

@@ -4,7 +4,11 @@
<div class="justify-content-center row">
<div class="col col-auto px-0">
<article>
{{ if .Scratch.Get "paige_show_full_pages" }}
{{ .Content }}
{{ else }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="paigeheaderlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
{{ end }}
</article>
</div>
</div>