Skip to content

Commit 28af076

Browse files
committed
default image configuration added.
1 parent 320ed82 commit 28af076

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Motonori Shindo's Monologue.
66
baseurl: "" # the subpath of your site, e.g. /blog
77
url: "https://blog.shin.do" # the base hostname & protocol for your site, e.g. http://example.com
88
color_scheme: auto # You can choose three modes auto, light, and dark. By default, the auto mode is set, which means the user can choose the light or dark mode themself.
9-
9+
default_image: "/images/lukas-blazek-GnvurwJsKaY-unsplash.jpg"
1010

1111
#-------------------------------
1212
# Author Settings

_includes/article.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
<a class="article__image" href="{{post.url | prepend: site.baseurl}}">
2020
<img class="lazy" data-src="{{site.baseurl}}{{post.image}}" alt="{{post.title}}">
2121
</a>
22+
{% else %}
23+
<a class="article__image" href="{{post.url | prepend: site.baseurl}}">
24+
<img class="lazy" data-src="{{site.baseurl}}{{site.default_image}}" alt="{{post.title}}">
25+
</a>
2226
{% endif %}
2327

2428
</div>

0 commit comments

Comments
 (0)