summaryrefslogtreecommitdiffstats
path: root/blog/_layouts
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/_layouts
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/_layouts')
-rw-r--r--blog/_layouts/post.html3
1 files changed, 3 insertions, 0 deletions
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
<article class="post">
{% include post-header.html post = page %}
<section class="post-body">
+ {% if page.page-image %}
+ {{ page.page-image | img: "magick:resize:590x" }}
+ {% endif %}
{{ content }}
</section>
<footer>