From 285de9287b040a252a6e008316c34bfc33f51f71 Mon Sep 17 00:00:00 2001 From: Kerby Martino Date: Fri, 2 May 2025 03:13:03 +0800 Subject: [PATCH] Add upvotes and comments count to single post metadata Updated the single post metadata to include upvotes and comments count. Adjusted the layout template to correctly reference the new comments_count field from the page object. --- _layouts/post.liquid | 2 +- pages/single-post.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_layouts/post.liquid b/_layouts/post.liquid index d724d6e..b77cfcd 100644 --- a/_layouts/post.liquid +++ b/_layouts/post.liquid @@ -24,7 +24,7 @@ layout: default REPLY - {{ post.comments_count }} + {{ page.comments_count }} diff --git a/pages/single-post.md b/pages/single-post.md index fb76ba9..c4c087e 100644 --- a/pages/single-post.md +++ b/pages/single-post.md @@ -5,5 +5,7 @@ permalink: /posts/ask-the-saga-of-the-disappearing-ergonomic-chair-continues/ author: deskdetective date: 2023-10-02 10:00:00 +0000 slug: 2023-10-02-ask-the-saga-of-the-disappearing-ergonomic-chair-continues +upvotes: 15 +comments_count: 8 --- Every time I leave my desk, it seems to vanish. Suspecting foul play at this point. Anyone else faced something like this? \ No newline at end of file