diff options
author | Adam Carpenter <gitlab@53hor.net> | 2019-06-03 20:19:48 -0400 |
---|---|---|
committer | Adam Carpenter <gitlab@53hor.net> | 2019-06-03 20:19:48 -0400 |
commit | a2a168223078198e72dbcfa6c4d755819fe07b83 (patch) | |
tree | 2e02df5b0f4d5aa13b71878722a1998bf7a7f116 /_includes/similar-posts.liquid | |
parent | fc2e0aced5013b50ecdbcfcf8ed3fd055ab63da5 (diff) | |
parent | cd1969f17742d9d72b1502cb2a6baa62e8be5c3e (diff) | |
download | cobalt-site-a2a168223078198e72dbcfa6c4d755819fe07b83.tar.xz cobalt-site-a2a168223078198e72dbcfa6c4d755819fe07b83.zip |
Merge branch 'construction'
Diffstat (limited to '_includes/similar-posts.liquid')
-rw-r--r-- | _includes/similar-posts.liquid | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/_includes/similar-posts.liquid b/_includes/similar-posts.liquid new file mode 100644 index 0000000..0dddca2 --- /dev/null +++ b/_includes/similar-posts.liquid @@ -0,0 +1,28 @@ +<aside class="menu"> + <p class="menu-label"> + 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 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 %} + </ul> +</aside> |