From e75533a0ae34d0d333e3fe39882db3a934435e2d Mon Sep 17 00:00:00 2001 From: Dominik Oswald <6849456+d-oit@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:47:35 +0100 Subject: [PATCH] Params config for thumbnails.ratio Add params ratio for thumbnails [thumbnails] ratio = "16x9" --- layouts/partials/single/thumbnail.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/single/thumbnail.html b/layouts/partials/single/thumbnail.html index cafa989a..cafbbaa5 100644 --- a/layouts/partials/single/thumbnail.html +++ b/layouts/partials/single/thumbnail.html @@ -3,7 +3,7 @@ {{- with .wrapper }}{{ $wrapper = printf "img-wrap %s" . }}{{ end -}} {{ $class := "rounded" }} {{ with .class }}{{ $class = . }}{{ end }} -{{- $ratio := .ratio | default "21x9" -}} +{{- $ratio := .ratio | default (site.Params.thumbnails.ratio | default "21x9") -}} {{- $thumbnail := "" -}} {{- $credits := "" -}} {{ $figclass := .figclass }} @@ -39,4 +39,4 @@ {{ if $thumbnail -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" $ratio "wrapper" $wrapper "class" $class "title" $page.Params.title "caption" $credits "figclass" $figclass "priority" "high") -}} -{{ end -}} \ No newline at end of file +{{ end -}}