use permalink for page bundle images

This commit is contained in:
Gabriele Musco 2022-10-25 07:07:20 +02:00
parent 3706ace5e8
commit 49eb66136e
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE
7 changed files with 7 additions and 7 deletions

View file

@ -20,7 +20,7 @@
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ else }}
<img src="/{{ path.Join .File.Dir .Params.Image }}" alt="{{ .Params.Alt }}" />
<img src="{{ .Permalink }}/{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ end }}
</a>
{{ end }}