blog_theme/partials/related.hbs
2020-09-24 10:21:50 +08:00

15 lines
486 B
Handlebars

{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}"
include="tags,authors" as |related|}}
{{#if related}}
<section class="related-posts">
<h3 class="related-title">
<span class="text">You might also like...</span>
</h3>
<div class="post-feed">
{{#foreach related}}
{{> loop}}
{{/foreach}}
</div>
</section>
{{/if}}
{{/get}}