Fix for comment rendering
This commit is contained in:
1 parent
f5790642b2
commit
c8540a111d
5 files changed
+42
-32
No files matched your search
@@ -47,14 +47,7 @@ layout: default
|
||||
<h3 class="mt-4 text-lg font-medium">Comments</h3>
|
||||
|
||||
<div class="mt-4">
|
||||
{% assign filename = page.path | split: "/" | last | replace: ".markdown", "" | replace: ".md", "" %}
|
||||
{% if page.slug %}
|
||||
{% assign post_id = page.slug %}
|
||||
{% else %}
|
||||
{% assign post_id = filename %}
|
||||
{% endif %}
|
||||
{% assign top_level_comments = site.comments | where: "post", post_id | where_exp: "item", "item.parent == nil" | sort: "date" %}
|
||||
|
||||
{% assign top_level_comments = site.comments | where: "post", page.slug | where_exp: "item", "item.parent == nil" | sort: "date" %}
|
||||
{% if top_level_comments.size > 0 %}
|
||||
{% for comment in top_level_comments %}
|
||||
{% include comment.liquid comment=comment %}
|
||||
@@ -64,3 +57,4 @@ layout: default
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user