Files
paige-hugo/layouts/partials/paige/content.html
2023-03-19 18:18:38 -07:00

8 lines
332 B
HTML

{{ $page := . }}
{{ $content := $page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` (printf `${1}<a aria-label="%v" class="paige-header-link" href="#${2}">#</a>${3}` (i18n "paige_aria_section_link")) | safeHTML }}
{{ with $content }}
<div class="mw-100 overflow-x-auto" id="paige-content">{{ . }}</div>
{{ end }}