diff --git a/templates/blog-post.html b/templates/blog-post.html index 962d881..f104578 100644 --- a/templates/blog-post.html +++ b/templates/blog-post.html @@ -2,7 +2,8 @@ {% from "macros/blog.html" import render_blog_post %} {% block title %}{{ this.title }}{% endblock %} {% block body %} -
+{% set background_image = this.attachments.images.first() %} +
diff --git a/templates/macros/blog.html b/templates/macros/blog.html index 2a71e01..22f5e88 100644 --- a/templates/macros/blog.html +++ b/templates/macros/blog.html @@ -3,7 +3,8 @@
- {% if from_index %}

{% else %}

{% endif %} + {% set image = post.attachments.images.first() %} + {% if from_index %}

{% else %}

{% endif %}
{% if from_index %}

{{ post.title }}

@@ -25,5 +26,4 @@ {% else %} {{ post.body }} {% endif %} - {% endmacro %}