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-05-11 00:11:02 +0300
committerIvan Boothe <git@rootwork.org>2022-05-11 00:11:02 +0300
commit1e6cff4241b906e0dc9c69b8476977482aad6a72 (patch)
treec8cc648d3394a2495dbe10ea6e64a45c6684d78c /layouts
parent043118b58d3047ea1fa0e78551b5f3bf7d66eaac (diff)
add featured image caption
Signed-off-by: Ivan Boothe <git@rootwork.org>
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/image.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 3da6557..2cfeca6 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -16,7 +16,7 @@
{{- partial "post-meta" . }}
{{- with .Params.featureImage -}}
<div class="post_featured">
- {{- partial "image" (dict "file" . "alt" $p.featureImageAlt "type" "featured" "Page" $.Page) }}
+ {{- partial "image" (dict "file" . "alt" $p.featureImageAlt "cap" $p.featureImageCap "type" "featured" "Page" $.Page) }}
</div>
{{- end -}}
{{ if $p.toc }}
diff --git a/layouts/partials/image.html b/layouts/partials/image.html
index 2292dfe..2e67941 100644
--- a/layouts/partials/image.html
+++ b/layouts/partials/image.html
@@ -3,7 +3,7 @@
{{- if not $alt -}}
{{- $alt = .Text -}}
{{- end -}}
-{{- $cap := .Title -}}
+{{- $cap := .cap -}}
{{- $scratch := newScratch -}}
{{- $scratch.Set "classes" "image_figure" -}}