From 076b54bd1ba793256de05dfb5c79e796f122923e Mon Sep 17 00:00:00 2001 From: "Kerby Martino (aider)" Date: Fri, 2 May 2025 12:21:50 +0800 Subject: [PATCH] fix: Render comments in mobile view by adjusting parent filter logic --- _includes/mobile_comment.liquid | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/_includes/mobile_comment.liquid b/_includes/mobile_comment.liquid index 372c3af..140f297 100644 --- a/_includes/mobile_comment.liquid +++ b/_includes/mobile_comment.liquid @@ -3,23 +3,14 @@ Assumes JavaScript will handle the navigation to nested replies using fragment identifiers. {% endcomment %} - - - {% assign post_comments = site.comments | where: "post", page.slug %} - - -{% assign top_level_comments = post_comments | where_exp: "item", "item.parent == nil" | sort: "date" %} - - +{% assign top_level_comments = post_comments | where_exp: "item", "item.parent == nil or item.parent == ''" | sort: "date" %}
{% if top_level_comments.size > 0 %} {% for comment in top_level_comments %} - {% assign direct_replies = site.comments | where: "parent", comment.slug %} - -
{# Changed ID prefix for clarity #} +
@{{ comment.author }} @@ -55,4 +46,4 @@
-{% endcomment %} +