if share-img not provided, use cover-img or thumbnail. Also make sure all images work with both relative and absolute paths
This commit is contained in:
parent
88464eb569
commit
b2b6922a8f
5 changed files with 35 additions and 22 deletions
|
@ -9,7 +9,7 @@ layout: page
|
|||
<div class="posts-list">
|
||||
{% for post in posts %}
|
||||
<article class="post-preview">
|
||||
<a href="{{ post.url | relative_url }}">
|
||||
<a href="{{ post.url | absolute_url }}">
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
|
||||
{% if post.subtitle %}
|
||||
|
@ -40,8 +40,8 @@ layout: page
|
|||
{% assign thumbnail=thumbnail | strip %}
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image">
|
||||
<a href="{{ post.url | relative_url }}">
|
||||
<img src="{{ thumbnail | relative_url }}">
|
||||
<a href="{{ post.url | absolute_url }}">
|
||||
<img src="{{ thumbnail | absolute_url }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -50,7 +50,7 @@ layout: page
|
|||
{{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }}
|
||||
{% assign excerpt_word_count = post.excerpt | number_of_words %}
|
||||
{% if post.content != post.excerpt or excerpt_word_count > excerpt_length %}
|
||||
<a href="{{ post.url | relative_url }}" class="post-read-more">[Read More]</a>
|
||||
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read More]</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,7 +60,7 @@ layout: page
|
|||
Tags:
|
||||
{% if site.link-tags %}
|
||||
{% for tag in post.tags %}
|
||||
<a href="{{ '/tags' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
|
||||
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ post.tags | join: ", " }}
|
||||
|
@ -76,12 +76,12 @@ layout: page
|
|||
<ul class="pagination main-pager">
|
||||
{% if paginator.previous_page %}
|
||||
<li class="page-item previous">
|
||||
<a class="page-link" href="{{ paginator.previous_page_path | relative_url }}">← Newer Posts</a>
|
||||
<a class="page-link" href="{{ paginator.previous_page_path | absolute_url }}">← Newer Posts</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if paginator.next_page %}
|
||||
<li class="page-item next">
|
||||
<a class="page-link" href="{{ paginator.next_page_path | relative_url }}">Older Posts →</a>
|
||||
<a class="page-link" href="{{ paginator.next_page_path | absolute_url }}">Older Posts →</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue