fix(home): preview image missing [alt]
and img_path
(#1044)
Close #1044
This commit is contained in:
parent
de6ec65932
commit
aba9468b53
1 changed files with 9 additions and 1 deletions
|
@ -48,7 +48,15 @@ refactor: true
|
|||
{% if post.image.lqip %}
|
||||
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
||||
{% endif %}
|
||||
<img src="{{ post.image.path | default: post.image }}" w="15" h="8" {{ lqip }}>
|
||||
|
||||
{% assign src = post.image.path | default: post.image %}
|
||||
{% unless src contains '//' %}
|
||||
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
||||
{% endunless %}
|
||||
|
||||
{% assign alt = post.image.alt | default: 'Preview Image' %}
|
||||
|
||||
<img src="{{ src }}" w="15" h="8" alt="{{ alt }}" {{ lqip }}>
|
||||
{% endif %}
|
||||
|
||||
<div class="card-body d-flex flex-column">
|
||||
|
|
Loading…
Reference in a new issue