From dc7d1ebe8feb3d88c631a7cc9f691e3131b447ce Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Tue, 11 Oct 2022 13:31:50 +0800 Subject: [PATCH] [Journal] Fixed latest post query fixes #138 When the homepage posts are queried from a custom collection, the latest post didn't use to respect what collection it's in. Now the theme utilizes the main query instead of a custom one for fetching the latest post, so the custom collection works as expected. --- index.hbs | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/index.hbs b/index.hbs index 08194aa..671232d 100644 --- a/index.hbs +++ b/index.hbs @@ -3,32 +3,30 @@
{{^is "paged"}} - {{#get "posts" limit="1"}} - {{#foreach posts}} -
- -
- -

{{title}}

-
+ {{#foreach posts limit="1"}} +
- {{/foreach}} - {{/get}} +
+ {{reading_time}} + {{#if @site.comments_enabled}} + {{comment_count class="gh-card-comments"}} + {{/if}} + {{^has visibility="public"}} + {{> icons/star}} + {{/has}} +
+ +
+ {{/foreach}} {{/is}}