From cdb7e47a88ea714b856192339243e50353ed8057 Mon Sep 17 00:00:00 2001 From: Simon C Date: Thu, 3 Mar 2022 09:31:43 +0100 Subject: [PATCH] feat: Don't Resize svg file --- layouts/_default/_markup/render-image.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 657f8d1..3413376 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -3,6 +3,7 @@ S'il n'y a pas de / dans l'url d'une image alors on ajoute le path de l'article */}} {{ $path := cond (in .Destination "/") .Destination (path.Join "/" .Page.File.Dir .Destination) }} +{{ if ne (substr $path -3 3) "svg" }} {{ $image := .Page.Resources.GetMatch (printf "*%s*" .Destination) }} {{ with $image }} {{ $maxWidth := (default "610" site.Params.ImageWidth) }} @@ -12,4 +13,5 @@ {{ $path = $resized.RelPermalink }} {{ end }} {{ end }} +{{ end }} {{ .Text }}