mind-overflow-website-ghost.../partials/posts-card-small.hbs

17 lines
766 B
Handlebars
Raw Normal View History

{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags" as |related|}}
<h4>Similar posts</h4>
{{#foreach related}}
<article class="{{post_class}}">
<a class="mind-post-card-sidebar_main" href="{{url}}">
<img class="mind-post-card-sidebar_feature-image" src="{{img_url feature_image size="s"}}" />
<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> • <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time></p>
<h5>{{title}}</h5>
</header>
</a>
</article>
{{/foreach}}
{{else}}
<h4>No related posts</h4>
{{/get}}