Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Boothe <git@rootwork.org>2022-04-28 23:16:21 +0300
committerIvan Boothe <git@rootwork.org>2022-04-28 23:16:21 +0300
commite46f912e67884f8eddc1ebd75d86c636f0ce4c9a (patch)
treee41e64c3a7a73d0a94504ab166c50d0a6b459b08
parent3fcb1db2eaddee13cd5c9b1a69e7e644edf079c8 (diff)
pass page var to featured image
Signed-off-by: Ivan Boothe <git@rootwork.org>
-rw-r--r--layouts/_default/single.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 066d72d..6fa6fd6 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -14,16 +14,16 @@
{{- $t := .Title }}
<h1 class="post_title">{{ $t }}</h1>
{{- partial "post-meta" . }}
- {{- if .Params.featureImage -}}
+ {{- with .Params.featureImage -}}
<div class="post_featured">
- {{- partial "image" (dict "file" .Params.featureImage "type" "featured") }}
+ {{- partial "image" (dict "file" . "type" "featured" "Page" $.Page) }}
</div>
{{- end -}}
{{ if $p.toc }}
- <div class="post_toc">
- <h2>{{ T "overview" }}</h2>
- {{ .TableOfContents }}
- </div>
+ <div class="post_toc">
+ <h2>{{ T "overview" }}</h2>
+ {{ .TableOfContents }}
+ </div>
{{ end }}
<div class="post_body">
{{- .Content }}