Skip to content

Commit

Permalink
Merge pull request #1287 from d-oit/thumbnail-ratio
Browse files Browse the repository at this point in the history
Params config for thumbnails.ratio
  • Loading branch information
markdumay authored Nov 19, 2024
2 parents 64d7ff5 + 937b16c commit 4009661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/single/thumbnail.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 -}}
{{ end -}}

0 comments on commit 4009661

Please sign in to comment.