added 'Context' parameter to handle relative image paths based on the current page

This commit is contained in:
leoli
2024-05-14 17:27:45 +08:00
parent 4699c6465e
commit 8b8510b27b
5 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
<div class="lg:col-4 text-center">
{{ $image:= .Params.image }}
{{ if $image }}
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mx-auto" "Size" "200x200") }}
{{ partial "image" (dict "Src" $image "Context" .Page "Alt" .Title "Class" "mx-auto" "Size" "200x200") }}
{{ else if .Params.Email }}
<img
class="mx-auto"