mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-07 16:17:50 +00:00
fix(home): preview image missing [alt]
and img_path
(#1044)
Close #1044
This commit is contained in:
parent
de6ec65932
commit
aba9468b53
@ -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…
x
Reference in New Issue
Block a user