You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
556 B
HTML

{{ $page := . }}
{{ $class := $page.Param "paige.page.content.class" }}
{{ $content := "" }}
{{ if $page.Param "paige.page.title.hide" | not }}
{{ $content = cond ($page.Scratch.Get "paige_show_full_pages" | not | not) $page.Content ($page.Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a aria-label="Link to this section" class="paige-header-link" href="#${2}">#</a>${3}` | safeHTML) }}
{{ end }}
{{ with $content }}
<section class="paige-content {{ with $class }} {{ . }} {{ end }}">
{{ . }}
</section>
{{ end }}