summaryrefslogtreecommitdiffstats
path: root/blog/_includes
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2016-09-23 23:13:11 +0200
committerHarald Eilertsen <haraldei@anduin.net>2016-09-23 23:13:11 +0200
commit1cff80663610b68ec9a31a74d2aabf68184cb6ff (patch)
treec18d0d676620fc8e895b1009c397eeace6cecc01 /blog/_includes
parent8bbd13c073a968374367edd73e08af5144baf3e7 (diff)
downloadnorsk-urskog-main-1cff80663610b68ec9a31a74d2aabf68184cb6ff.tar.gz
norsk-urskog-main-1cff80663610b68ec9a31a74d2aabf68184cb6ff.tar.bz2
norsk-urskog-main-1cff80663610b68ec9a31a74d2aabf68184cb6ff.zip
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.
Diffstat (limited to 'blog/_includes')
-rw-r--r--blog/_includes/post-excerpt.html3
1 files changed, 3 insertions, 0 deletions
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 @@
<article class="post">
{% include post-header.html post = post %}
<section class="post-body">
+ {% if post.page-image %}
+ {{ post.page-image | img: "magick:resize:290x" }}
+ {% endif %}
{{ post.excerpt }}
<p><a href="{{ post.url | prepend: site.baseurl }}">{% t global.read_more %}</a></p>