From d52609f456f233ec0845c8a57a1e27583f0813ad Mon Sep 17 00:00:00 2001
From: kmdr
Date: Wed, 21 Jan 2026 18:04:10 +0800
Subject: feat: add remark42 support (#233)
---
config.toml | 5 +++++
templates/page.html | 14 +++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/config.toml b/config.toml
index 86218d7..ea831a1 100644
--- a/config.toml
+++ b/config.toml
@@ -283,11 +283,16 @@ favicon16 = "favicon-16x16.png" # favicon-16x16.png
###############################################################################
### Commenting System for visitors to leave comments on pages.
### hyvor talk
+### remark42
###############################################################################
+#comment_system = "hyvor" # valid values are: "hyvor", "remark42"
+
#comments.hyvor = "9366" # hyvor website id, comment out to disable.
#comments.hyvorcolor = "os" # set the color property for hyvor
+#comments.remark42 = "https://comments.example.com" # remark42 server url, comment out to disable.
+#comments.remark42_site_id = "remark" # remark42 site id
###############################################################################
### Icons
diff --git a/templates/page.html b/templates/page.html
index 18a5153..10ea571 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -31,8 +31,16 @@
{%- endblock seo %}
{%- block comments_init %}
- {%- if config.extra.comments.hyvor %}
+ {%- if not config.extra.comment_system or config.extra.comment_system == "hyvor" and config.extra.comments.hyvor %}
+ {%- elif config.extra.comment_system == "remark42" and config.extra.comments.remark42 %}
+
+
{%- endif %}
{%- endblock comments_init %}
@@ -90,9 +98,13 @@
{%- endblock page_footer %}
{%- block comments_body %}
+ {%- if not config.extra.comment_system or config.extra.comment_system == "hyvor" %}
{%- if config.extra.comments.hyvor %}