feat: Convertion des jpg en webp

This commit is contained in:
2021-05-03 14:57:56 +02:00
parent 9619c20b9b
commit 17a13a4430
4 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{{ $isBig := (default .IsHome .Params.big) }}
{{ $imageSizeSmall := cond $isBig "600x600 Top" "600x400 Center" }}
{{ $imageSizeBig := cond $isBig "1920x850 Top" "1920x450 Center" }}
{{ $imageSizeSmall := cond $isBig "600x600 Top webp" "600x400 Center webp" }}
{{ $imageSizeBig := cond $isBig "1920x850 Top webp" "1920x450 Center webp" }}
<header class="header{{ if $isBig }} home{{ end }}">
{{ $headless := .Site.GetPage "/" }}
{{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }}