summaryrefslogblamecommitdiff
path: root/_includes/similar-posts.liquid
blob: 0dddca2c8b20c6d96eaa8ba6ed535a18e3bca1fc (plain) (tree)
1
2
3
4
5
6
7






                                                 












                                                                        
 




                                    

         
<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>