Image feature can be on another site#143
Image feature can be on another site#143realAhmedRoach wants to merge 5 commits intommistakes:masterfrom
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
| {% 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.
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.
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.
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.comcan link to that image. Without this, an outside image will look like this:http://sitea.com/images/http://siteb.com/image.jpg