Rename listshowcontent to fullpages
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $fullpages := false }}
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $fullpages = $params.fullpages }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := $page.Param "paige.content.class" | default "mw-100 paige-content" }}
|
||||
{{ $content := "" }}
|
||||
|
||||
{{ if $page.Param "paige.content.hide" | not }}
|
||||
{{ $content = cond ($listshowcontent | not) ($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) $page.Content }}
|
||||
{{ $content = cond ($fullpages | not) ($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) $page.Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $content }}
|
||||
|
Reference in New Issue
Block a user