diff options
author | max.mehl <max.mehl@fsfe.org> | 2021-08-29 23:13:43 +0300 |
---|---|---|
committer | max.mehl <max.mehl@fsfe.org> | 2021-08-29 23:13:43 +0300 |
commit | 5d3eea356255446cb310ab9bc40149bb1fa075a8 (patch) | |
tree | dfc3c4bb9ffb310127a883080308e54723110119 | |
parent | ea40eff1b97f5253a46f16147b551520f1625d74 (diff) |
pass context to optional partials
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0470892..40a49ee 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -55,7 +55,7 @@ {{ range .Site.Params.customJS -}} <script src="{{ . | relURL }}"></script> {{- end }} - {{ with .Site.Params.customPartial }}{{ partial . }}{{ end }} + {{ if .Site.Params.customPartial }}{{ partial .Site.Params.customPartial . }}{{ end }} {{ partial "perpagebody" . }} </body> </html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 55040f1..4df967a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -5,7 +5,7 @@ <h1 class="main__title">{{ . }}</h1> </header> {{- end }} - {{- with .Site.Params.belowTitlePartial }}{{ partial . }}{{ end }} + {{- if .Site.Params.belowTitlePartial }}{{ partial .Site.Params.belowTitlePartial . }}{{ end }} {{- with .Content }} <div class="content main__content clearfix"> {{ . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 143f4e2..f187452 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,7 @@ <div class="post__meta meta">{{ . }}</div> {{- end }} </header> - {{- with .Site.Params.belowTitlePartial }}{{ partial . }}{{ end }} + {{- if .Site.Params.belowTitlePartial }}{{ partial .Site.Params.belowTitlePartial . }}{{ end }} {{- if and (.Params.thumbnail) (not .Params.thumbnail_hide_post) }} <figure class="post__thumbnail"> <img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Title }}"> diff --git a/layouts/index.html b/layouts/index.html index cca40a4..3274d84 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ <h1 class="main__title">{{ . }}</h1> </header> {{- end }} - {{- with .Site.Params.belowTitlePartial }}{{ partial . }}{{ end }} + {{- if .Site.Params.belowTitlePartial }}{{ partial .Site.Params.belowTitlePartial . }}{{ end }} {{- with .Content }} <div class="content main__content clearfix"> {{ . }} |