Add comment counter to page metadata

Also move the Isso script tag from comments.html to the <head>, since it
essentially needs to load on all pages.

Fixes #94
This commit is contained in:
2025-07-30 00:37:39 -05:00
parent d50a4dc6bd
commit 433dd125e2
5 changed files with 48 additions and 41 deletions

View File

@@ -0,0 +1,8 @@
<span class="page-metadata-item" aria-label="comments counter">
{{ partial "icon.html" "message" }}
{{/* TODO: figure out if there's a nicer way to generate this URL
* the current issue is that we can't use RelRef, since content view means that we don't
* have access to the original page context
*/}}
<a href="{{ .RelPermalink }}#isso-thread">comments</a>
</span>

View File

@@ -21,6 +21,7 @@
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/edithistory.html" . }}
{{ partial "page-metadata/item/viewraw.html" . }}
{{ partial "page-metadata/item/comments-counter.html" . }}
{{ partial "page-metadata/item/categories.html" . }}

View File

@@ -9,6 +9,7 @@
{{ partial "page-metadata/item/authors.html" . }}
{{ partial "page-metadata/item/readingtime.html" . }}
{{ partial "page-metadata/item/comments-counter.html" . }}
{{ partial "page-metadata/item/series.html" . }}
{{ partial "page-metadata/item/categories.html" . }}