mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
refactor: enhance the setting of preview image path
This commit is contained in:
@@ -26,13 +26,13 @@ tail_includes:
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if page.image.path %}
|
||||
{% if page.image %}
|
||||
{% capture bg %}
|
||||
{% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
|
||||
{% endcapture %}
|
||||
|
||||
<div class="mt-3 mb-3">
|
||||
<img src="{{ page.image.path }}" class="preview-img {{ bg | strip }}"
|
||||
<img src="{{ page.image.path | default: page.image }}" class="preview-img {{ bg | strip }}"
|
||||
alt="{{ page.image.alt | default: "Preview Image" }}"
|
||||
|
||||
{% if page.image.width %}
|
||||
|
||||
Reference in New Issue
Block a user