In v1.1.0, the Related Posts snippet in post.html lists the three posts, not in relation to the opened post. I thought of including a tag in the front matter e.g tag: Computer Science or tag: Fiction and then list the posts accordingly. How do I change the following code to incorporate this?
{% if site.related_posts.size >= 1 %}
<div class="related">
<h2>Related posts</h2>
<ul class="related-posts">
{% for post in site.related_posts limit:3 %}
<li>
<h3>
<a href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
<small>{{ post.date | date_to_string }}</small>
</a>
</h3>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
Apologies if this is something very basic to ask. I don't have any web design experience but I am having my fun modifying the theme.
In v1.1.0, the Related Posts snippet in
post.htmllists the three posts, not in relation to the opened post. I thought of including a tag in the front matter e.gtag: Computer Scienceortag: Fictionand then list the posts accordingly. How do I change the following code to incorporate this?{% if site.related_posts.size >= 1 %} <div class="related"> <h2>Related posts</h2> <ul class="related-posts"> {% for post in site.related_posts limit:3 %} <li> <h3> <a href="{{ site.baseurl }}{{ post.url }}"> {{ post.title }} <small>{{ post.date | date_to_string }}</small> </a> </h3> </li> {% endfor %} </ul> </div> {% endif %}Apologies if this is something very basic to ask. I don't have any web design experience but I am having my fun modifying the theme.