diff options
Diffstat (limited to 'layouts/partials/get_featured.html')
-rw-r--r-- | layouts/partials/get_featured.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/layouts/partials/get_featured.html b/layouts/partials/get_featured.html index f9fd419..aa99e78 100644 --- a/layouts/partials/get_featured.html +++ b/layouts/partials/get_featured.html @@ -1,7 +1,9 @@ {{ $video := partial "get_video" (dict "context" . "url" .Params.featuredVideo "keyword" "*featured*") }} {{ $image := partial "get_image.html" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }} +{{ $featured := ""}} {{ if $video }} -{{ $video }} +{{ $featured = $video }} {{ else if $image }} -<img src="{{ $image }}" class="w-full" alt="Featured Image"> -{{ end }}
\ No newline at end of file +{{ $featured = print "<img src=\"" $image "\" class=\"w-full\" alt=\"Featured Image\">" | safeHTML }} +{{ end }} +{{ return $featured }}
\ No newline at end of file |