summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/all-posts.liquid5
-rw-r--r--_includes/post-list.liquid3
-rw-r--r--_includes/similar-posts.liquid31
3 files changed, 23 insertions, 16 deletions
diff --git a/_includes/all-posts.liquid b/_includes/all-posts.liquid
index f8377b1..ef05295 100644
--- a/_includes/all-posts.liquid
+++ b/_includes/all-posts.liquid
@@ -4,9 +4,10 @@
</p>
<ul class="menu-list">
- {% for post in collections.posts.pages %}
+ {% assign posts = collections.posts.pages | reverse %}
+ {% for post in posts %}
<li>
- <a href="{{ post.permalink }}">
+ <a href="/{{ post.permalink }}">
{% if post.published_date %}
<span class="tag">
{{ post.published_date | date: "%e %b %Y" }}
diff --git a/_includes/post-list.liquid b/_includes/post-list.liquid
index 7f6d55d..e62fd63 100644
--- a/_includes/post-list.liquid
+++ b/_includes/post-list.liquid
@@ -1,5 +1,6 @@
<div class="columns is-centered is-multiline">
- {% for post in collections.posts.pages %}
+ {% assign posts = collections.posts.pages | reverse %}
+ {% for post in posts %}
<div class="column is-full">
<div class="card">
<header class="card-header">
diff --git a/_includes/similar-posts.liquid b/_includes/similar-posts.liquid
index be5ef52..0dddca2 100644
--- a/_includes/similar-posts.liquid
+++ b/_includes/similar-posts.liquid
@@ -5,19 +5,24 @@
<ul class="menu-list">
{% for post in collections.posts.pages %}
- {% if post.categories contains page.categories.first %}
- <li>
- <a href="{{ post.permalink }}">
- {% if post.published_date %}
- <span class="tag is-rounded">
- {{ post.published_date | date: "%e %b %Y" }}
- </span>
- {% endif %}
+ {%
+ if post.categories
+ and page.categories
+ and page.title != post.title
+ and post.categories contains page.categories.first
+ %}
+ <li>
+ <a href="/{{ post.permalink }}">
+ {% if post.published_date %}
+ <span class="tag is-rounded">
+ {{ post.published_date | date: "%e %b %Y" }}
+ </span>
+ {% endif %}
- {{ post.title }}
- </a>
- </li>
- {% endif %}
- {% endfor %}
+ {{ post.title }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
</ul>
</aside>