From c197f3399b0aee698afc5278dbb33506892311ef Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 3 May 2021 21:47:19 +0200 Subject: #286, Add ability to set image for posts --- layouts/partials/docs/post-meta.html | 10 ++++++++++ layouts/posts/single.html | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/docs/post-meta.html b/layouts/partials/docs/post-meta.html index c56a528..527431a 100644 --- a/layouts/partials/docs/post-meta.html +++ b/layouts/partials/docs/post-meta.html @@ -11,3 +11,13 @@ {{ end }} {{ end }} + +

+{{ if .Params.image}} + {{ with .Resources.GetMatch .Params.image }} + + {{ else }} + + {{ end }} +{{ end }} +

diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 00df697..79cd303 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -4,9 +4,7 @@ {{ .Title }} {{ partial "docs/post-meta" . }} -

- {{- .Content -}} -

+ {{- .Content -}} {{ end }} -- cgit v1.2.3