diff options
Diffstat (limited to '_includes/posts-similar.liquid')
-rw-r--r-- | _includes/posts-similar.liquid | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/_includes/posts-similar.liquid b/_includes/posts-similar.liquid new file mode 100644 index 0000000..6879d3b --- /dev/null +++ b/_includes/posts-similar.liquid @@ -0,0 +1,19 @@ +<aside class="menu"> + <p class="menu-label has-text-centered"> + Similar Posts + </p> + + <ul class="menu-list"> + {% for post in collections.posts.pages %} + {% + if post.categories + and page.categories + and page.title != post.title + and page.categories.first + and post.categories contains page.categories.first + %} + {% include post-link.liquid %} + {% endif %} + {% endfor %} + </ul> +</aside> |