mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-22 18:00:06 +01:00
keep it simple and just return default related posts
This commit is contained in:
parent
3128815f1a
commit
32aec8c704
@ -5,22 +5,13 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{% for post in site.related_posts %}
|
{% for post in site.related_posts limit:6 %}
|
||||||
|
|
||||||
{% assign match = false %}
|
|
||||||
{% for category in post.categories %}
|
|
||||||
{% if page.categories contains category %}
|
|
||||||
{% assign match = true %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if match %}
|
|
||||||
<article class="related-post col2">
|
<article class="related-post col2">
|
||||||
<a class="post-title-link" href="{{ post.url }}">
|
<a class="post-title-link" href="{{ post.url }}">
|
||||||
<h1 class="post-title">{{ post.title }}</h1>
|
<h1 class="post-title">{{ post.title }}</h1>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user