fix: ensure correct assignment of replies and debug output

This commit is contained in:
Kerby Martino (aider) committed 2025-04-29 11:05:22 +08:00
1 parent c1821a8eb8
commit f5790642b2
1 file changed
+3 -4
+3 -4
View File
@@ -14,13 +14,12 @@
</div> </div>
{% assign replies = site.comments | where: "parent", comment.slug | sort: "date" %} {% assign replies = site.comments | where: "parent", comment.slug | sort: "date" %}
<div>comment_slug: {{ comment.slug }}</div> <!-- output is "comment1" --> <div>comment_slug: {{ comment.slug }}</div> <!-- output is "comment1" -->
{% for reply in replies %} {% for reply in replies %}
<div>parent: {{ reply.parent }}</div> <!-- OK, matches comment.slug --> <div>parent: {{ reply.parent }}</div> <!-- OK, matches comment.slug -->
<div>slug: {{ reply.slug }}</div> <!-- OK --> <div>slug: {{ reply.slug }}</div> <!-- OK -->
<div class="ml-2 mt-4 border-l-2 border-gray-200 pl-2 text-sm md:pl-4"> <div class="ml-2 mt-4 border-l-2 border-gray-200 pl-2 text-sm md:pl-4">
<!-- Error: Nesting too deep included in ../_layouts/post.liquid -->
{% include comment.liquid comment=reply %} {% include comment.liquid comment=reply %}
</div> </div>
{% endfor %} {% endfor %}