added 'Context' parameter to handle relative image paths based on the current page
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="bg-body dark:bg-darkmode-body">
|
||||
{{ $image:= .Params.image }}
|
||||
{{ if $image }}
|
||||
{{ partial "image" (dict "Src" $image "Alt" .Title "Class" "mb-6 w-full rounded") }}
|
||||
{{ partial "image" (dict "Src" $image "Context" .Page "Alt" .Title "Class" "mb-6 w-full rounded") }}
|
||||
{{ end }}
|
||||
<h4 class="mb-3">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
|
||||
Reference in New Issue
Block a user