This commit is contained in:
GZod01 2024-11-12 14:48:59 +01:00
parent e96655be3d
commit 82d2f01d98
2 changed files with 16 additions and 4 deletions

View file

@ -8,6 +8,13 @@ summaryLength = 50
assetDir = "assets"
[module]
[[module.mounts]]
source="static"
target="assets"
[[module.mounts]]
source="assets"
target="assets"
[languages]
[languages.fr]

View file

@ -18,17 +18,22 @@
{{ end }}
{{ if .Params.banner }}
{{ if (and .Params.banner false ) }}
<b>helloworld</b>
{{/* $featuredImage := .Resources.GetMatch (.Params.banner | safeURL) }}
{{ $featuredImagePath := (.Params.banner | safeURL)}}
{{ $featuredImageRelPath := (strings.TrimPrefix "https://werobot.fr/" $featuredImagePath )}}
{{ $featuredImage := resources.Get $featuredImageRelPath }}
{{ debug.Dump $featuredImage }}
{{ debug.Dump $featuredImagePath }}
{{ debug.Dump $featuredImageRelPath }}
{{ $featuredImageCaption := "Bannière représentant l'article" }}
{{ if $featuredImage */}}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "600x" }}
<figure>
<img alt="{{ $featuredImageCaption }}" src="{{ $featuredImage.RelPermalink }}" />
<figcaption>{{ $featuredImageCaption }}</figcaption>
</figure>
{{/* end */}}
{{ end }}
{{ end }}
{{ range .Params.tags }}