-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Image feature can be on another site #143
base: master
Are you sure you want to change the base?
Conversation
Add Weibo to footer
@theTechnoKid Thank you for adding this code here! I had the same issue. Thank you! |
@theTechnoKid I was actually going to implement this myself! I'm glad I checked the open pull requests! Great minds think alike 😸 I would also suggest you make the change to |
_layouts/post-index.html
Outdated
@@ -16,7 +16,11 @@ | |||
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %} | |||
{% if page.image.feature %} | |||
<div class="entry-image"> | |||
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}"> | |||
{% if page.image.feature contains 'http://' or page.image.feature contains 'https://' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would {% if post.image.feature contains 'http' %}
be a shorter way to say this? It covers both the http://
and https://
. Although it makes it so that images can't be named something like https-ssl-example.png
. Thoughts @theTechnoKid ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better is to shorten it to ://
. I use that in my other themes as it covers both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I'll fix that.
If the image feature is on another space in the internet, it can be displayed as a feature image.
For example if a site is on
sitea.com
, and the image is onsiteb.com
,sitea.com
can link to that image. Without this, an outside image will look like this:http://sitea.com/images/http://siteb.com/image.jpg