diff options
-rw-r--r-- | layouts/partials/project/item.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/project/item.html b/layouts/partials/project/item.html index 4d1a7c7..1706760 100644 --- a/layouts/partials/project/item.html +++ b/layouts/partials/project/item.html @@ -1,6 +1,11 @@ {{ $url := $.Site.BaseURL }} -{{ $image := .Params.image | urlize }} +{{ if isset .Params "image" }} + {{ $.Scratch.Set "image" .Params.image }} +{{ else }} + {{ $.Scratch.Set "image" "/img/placeholder.jpg" }} +{{ end }} +{{ $image := $.Scratch.Get "image" | urlize }} {{ $title := .Title }} {{ $summary := .Summary }} {{ $link := .Permalink }} |