Skip to content

Commit 1920dc7

Browse files
Revert "removing post image for now"
This reverts commit e5e3b2a.
1 parent 66a7ea8 commit 1920dc7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

_layouts/home.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@
4444
{% for post in posts %}
4545
<a href="{{ post.url | relative_url }}" class="card-wrapper">
4646
<div class="card post-preview flex-md-row-reverse">
47+
{% if post.image %}
48+
{% if post.image.lqip %}
49+
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
50+
{% endif %}
51+
52+
{% assign src = post.image.path | default: post.image %}
53+
{% unless src contains '//' %}
54+
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
55+
{% endunless %}
56+
57+
{% assign alt = post.image.alt | default: 'Preview Image' %}
58+
59+
<img src="{{ src }}" w="15" h="8" alt="{{ alt }}" {{ lqip }}>
60+
{% endif %}
4761

4862
<div class="card-body d-flex flex-column">
4963
<h1 class="card-title my-2 mt-md-0">

0 commit comments

Comments
 (0)