summaryrefslogtreecommitdiff
path: root/_includes/posts-similar.liquid
blob: 6879d3b49c5e07e18a2472819709a2ef4e5e7209 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>