From 1cff80663610b68ec9a31a74d2aabf68184cb6ff Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 23 Sep 2016 23:13:11 +0200 Subject: Add support for page/post-images. Add "page-image: imagepath" to the page or post front matter, and the image will be shown in the appropriate size for where the post is shown. --- blog/_includes/post-excerpt.html | 3 +++ blog/_layouts/post.html | 3 +++ 2 files changed, 6 insertions(+) (limited to 'blog') diff --git a/blog/_includes/post-excerpt.html b/blog/_includes/post-excerpt.html index 125e984..52704e7 100644 --- a/blog/_includes/post-excerpt.html +++ b/blog/_includes/post-excerpt.html @@ -2,6 +2,9 @@
{% include post-header.html post = post %}
+ {% if post.page-image %} + {{ post.page-image | img: "magick:resize:290x" }} + {% endif %} {{ post.excerpt }}

{% t global.read_more %}

diff --git a/blog/_layouts/post.html b/blog/_layouts/post.html index cb33296..555bdc6 100644 --- a/blog/_layouts/post.html +++ b/blog/_layouts/post.html @@ -5,6 +5,9 @@ layout: default
{% include post-header.html post = page %}
+ {% if page.page-image %} + {{ page.page-image | img: "magick:resize:590x" }} + {% endif %} {{ content }}