{% comment %} Flat iterative version - no recursion, just nested loops up to N levels {% endcomment %} {% assign top_comments = site.comments | where: "parent", nil | sort: "date" %} {% for comment in top_comments %}
▲ @{{ comment.author }} {{ comment.date | date: "%b %d, %Y" }}

{{ comment.content }}

reply {% assign replies = site.comments | where: "parent", comment.slug | sort: "date" %} {% for reply in replies %}
@{{ reply.author }} – {{ reply.date | date: "%b %d, %Y" }}

{{ reply.content }}

reply {% assign replies2 = site.comments | where: "parent", reply.slug | sort: "date" %} {% for reply2 in replies2 %}
@{{ reply2.author }} – {{ reply2.date | date: "%b %d, %Y" }}

{{ reply2.content }}

reply {# Extend further levels here if needed #}
{% endfor %}
{% endfor %}
{% endfor %}