2020-11-06 00:27:57 +01:00
|
|
|
{{!-- Gest the 3 most recent related posts --}}
|
|
|
|
{{#get "posts" limit="3" filter="id:-{{post.id}}+tags:[{{post.tags}}]" include="tags" as |related|}}
|
2020-11-04 23:47:36 +01:00
|
|
|
<h4>Similar posts</h4>
|
|
|
|
{{#foreach related}}
|
|
|
|
<article class="{{post_class}}">
|
|
|
|
<a class="mind-post-card-sidebar_main" href="{{url}}">
|
2020-11-04 23:43:30 +01:00
|
|
|
|
2020-11-04 23:47:36 +01:00
|
|
|
{{#if feature_image}}
|
|
|
|
<img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}"
|
2021-03-16 18:36:06 +01:00
|
|
|
alt="{{title}}"/>
|
2020-11-04 23:47:36 +01:00
|
|
|
{{/if}}
|
|
|
|
<header class="mind-post-card-sidebar_header">
|
|
|
|
<p class="mind-post-card-sidebar_meta"><span
|
|
|
|
class="mind-post-card-sidebar_tag">{{primary_tag.name}}</span> •
|
2021-01-03 15:56:27 +01:00
|
|
|
<time class="post-date" datetime="{{date published_at format='YYYY-MM-DD'}}">{{date
|
|
|
|
published_at format="DD MMMM YYYY"}}</time>
|
2020-11-04 23:47:36 +01:00
|
|
|
</p>
|
|
|
|
<h5>{{title}}</h5>
|
|
|
|
</header>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
{{/foreach}}
|
2020-08-18 18:20:39 +02:00
|
|
|
{{else}}
|
2020-11-04 23:47:36 +01:00
|
|
|
<h4>No related posts</h4>
|
2020-08-18 18:20:39 +02:00
|
|
|
{{/get}}
|