summaryrefslogblamecommitdiff
path: root/_includes/similar-posts.liquid
blob: 9a7e33a33c2cd7485d0b71dc505c93665e0c2420 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11






                                                 



                                        
                                     








                                                                        
 




                                    

         
<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 page.categories.first
            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>