Sort "Related posts" by recently published (#515)

This commit is contained in:
Avi Leavitt 2023-05-22 16:27:23 -04:00 committed by GitHub
parent 21d328f797
commit 988dbf1c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ into the {body} of the default.hbs template --}}
{{/post}} {{/post}}
{{!-- Related posts --}} {{!-- Related posts --}}
{{#if post.tags.length}} {{#if post.tags.length}}
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}} {{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" order="published_at desc" as |related|}}
{{#if related}} {{#if related}}
<section class="m-recommended"> <section class="m-recommended">
<div class="l-wrapper in-recommended"> <div class="l-wrapper in-recommended">