wowthemesnet / mundana-theme-jekyll

Mundana is a free Jekyll theme, Medium styled.
https://wowthemesnet.github.io/mundana-theme-jekyll/
748 stars 803 forks source link

Fix bug can not show the second latest post's image #17

Open thinhdanggroup opened 5 years ago

thinhdanggroup commented 5 years ago

Hello,

Current, I am using your theme on my website. But the second latest post has the wrong URL ( the post's image can not render like below picture ), it uses a second_post.image | absolute_url instead of {{second_post.baseurl}}/{{ second_post.image }}. I think this is someone's mistake.

image

pongsoft commented 1 year ago

Hello,

Are you sure that your amendment works?

{{second_post.baseurl}}/{{ second_post.image }} does not work for me. I resolved with the following fix.

THIS:

<img class="w-100" src="{% if second_post.image contains "://" %}{{ second_post.image }}{% else %}{{ second_post.image | absolute_url }}{% endif %}" alt="{{ second_post.title }}">

WAS REPLACED WITH:

<img class="w-100" src="{% if second_post.image contains "://" %}{{ second_post.image }}{% else %}{{site.baseurl}}/{{ second_post.image }}{% endif %}" alt="{{ second_post.title }}">