From c0cf2e73bee3957e1fc292426b045d28e239d827 Mon Sep 17 00:00:00 2001 From: Simon C Date: Mon, 3 May 2021 16:32:23 +0200 Subject: [PATCH] feat: Suppression des warning Hugo --- layouts/_default/_markup/render-image.html | 2 +- layouts/_default/_markup/render-link.html | 2 +- layouts/_default/list.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index a6b9547..6ce3e10 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,5 +1,5 @@ {{/* 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.Dir .Destination) }} +{{ $path := cond (in .Destination "/") .Destination (path.Join "/" .Page.File.Dir .Destination) }} {{ .Text }} diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 507ecd4..e2ecb09 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -7,7 +7,7 @@ {{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }} {{ $hasSlash := in .Destination "/" }} {{- if $isWebLink -}} - {{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.Dir .Destination) .Destination }} + {{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.File.Dir .Destination) .Destination }} {{ .Text | safeHTML }} {{- else -}} {{- $separators := cond $isMailtoLink ":@." ":" -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ca0f1c7..ba11c9e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,7 +6,7 @@