🐛 Render comments in the simple article layout

Extract the comments block into a shared article-comments partial and
include it from both single and simple layouts. Fixes #2938.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Nuno CoraçãoandClaude Fable 5 authored and Nuno C. committed 2026-08-17 20:19:02 +01:00
1 parent d50d80bb34
commit 1784d3c13b
3 files changed
+15 -13

No files matched your search

+2 -1
View File
@@ -11,8 +11,9 @@
<section class="max-w-full mt-6 prose dark:prose-invert">
{{ .Content }}
</section>
<footer class="pt-8">
<footer class="pt-8 print:hidden">
{{ partial "sharing-links.html" . }}
{{ partial "article-comments.html" . }}
</footer>
</article>
{{ end }}
+1 -12
View File
@@ -88,18 +88,7 @@
{{/* Footer */}}
<footer class="pt-8 max-w-prose print:hidden">
{{ partial "article-pagination.html" . }}
{{ if .Params.showComments | default (site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }}
<div class="pt-3">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="pt-3">
{{ partial "comments.html" . }}
</div>
</div>
{{ else }}
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
{{ end }}
{{ end }}
{{ partial "article-comments.html" . }}
</footer>
</article>
{{ end }}
+12
View File
@@ -0,0 +1,12 @@
{{ if .Params.showComments | default (site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }}
<div class="pt-3">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="pt-3">
{{ partial "comments.html" . }}
</div>
</div>
{{ else }}
{{ warnf "[BLOWFISH] Comments are enabled for %s but no comments partial exists." .File.Path }}
{{ end }}
{{ end }}