mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Add alt attribute to the post's preview image (#271)
This commit is contained in:
committed by
Cotes Chung
parent
7a87ab4d05
commit
eacad65cbb
@@ -44,8 +44,8 @@ layout: default
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
{% if page.image %}
|
||||
<img src="{{ page.image }}" class="preview-img" alt="Preview Image">
|
||||
{% if page.image.src %}
|
||||
<img src="{{ page.image.src }}" class="preview-img" alt="{{ page.image.alt | default: "Preview Image" }}">
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
Reference in New Issue
Block a user