Replace some page config prefixes with nesting
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
{{ $class := .Param "paige.page.content_class" }}
|
||||
{{ $content := cond (.Scratch.Get "paige_show_full_pages" | not | not) .Content (.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) }}
|
||||
{{ $class := .Param "paige.page.content.class" }}
|
||||
{{ $content := "" }}
|
||||
|
||||
{{ if .Param "paige.page.title.hide" | not }}
|
||||
{{ $content = cond (.Scratch.Get "paige_show_full_pages" | not | not) .Content (.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 }}">
|
||||
|
Reference in New Issue
Block a user