Assign template context to var
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{{ $class := .Param "paige.page.title.class" | default "display-5 fw-bold text-center" }}
|
||||
{{ $title := cond (.Param "paige.page.title.hide" | not) (.Title | markdownify) "" }}
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $class := $page.Param "paige.page.title.class" | default "display-5 fw-bold text-center" }}
|
||||
{{ $title := cond ($page.Param "paige.page.title.hide" | not) ($page.Title | markdownify) "" }}
|
||||
|
||||
{{ if $title }}
|
||||
<h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
|
||||
<h1 class="{{ $class }}">{{ if $page.Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if $page.Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ $page.RelPermalink }}">#</a>{{ end }}</h1>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user