Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 2nd latest post image url formation issue #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnanthaRajuC
Copy link

@AnanthaRajuC AnanthaRajuC commented Apr 30, 2021

When the theme was hosted on my GitHub account, the 2nd post image was not being rendered due to a URL formation issue.

Old code in index.html file

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

Fix in index.html file

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant