From d7cc1a9192b47c9bc24a2b9248547ea36b7709e7 Mon Sep 17 00:00:00 2001
From: Gabriele Musco
Date: Wed, 16 Jun 2021 09:56:00 +0200
Subject: [PATCH] added initial support for cactus comments, put commento
comments in its own partial
---
README.md | 5 +++++
layouts/_default/single.html | 10 ++--------
layouts/partials/cactus_chat.html | 16 ++++++++++++++++
layouts/partials/commento.html | 8 ++++++++
4 files changed, 31 insertions(+), 8 deletions(-)
create mode 100644 layouts/partials/cactus_chat.html
create mode 100644 layouts/partials/commento.html
diff --git a/README.md b/README.md
index 6f984c8..a134b81 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,11 @@ summaryLength = 70 # number of words for article summaries
# enable comments support with commento using the script from your server
commento = "https://example.com/js/commento.js"
+ # enable comments support with cactus comments (cactus.chat)
+ cactusCommentsSiteName = "example.com"
+ cactusCommentsServerName = "https://matrix.cactus.chat:8448"
+ cactusCommentsHomeserver = "https://matrix.cactus.chat:8448"
+
# enable analytics using Plausible
plausibleScriptUrl = "https://something.com/..."
plausibleDomain = "example.com"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 1bc309e..b9e4f4e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -26,13 +26,7 @@
{{ end }}
{{- partial "inject/content-after.html" . -}}
- {{ if .Site.Params.commento }}
-
-
- {{ end }}
+ {{- partial "commento.html" . -}}
+ {{- partial "cactus_chat.html" . -}}
{{- partial "related_articles.html" . -}}
{{ end }}
diff --git a/layouts/partials/cactus_chat.html b/layouts/partials/cactus_chat.html
new file mode 100644
index 0000000..187d9f1
--- /dev/null
+++ b/layouts/partials/cactus_chat.html
@@ -0,0 +1,16 @@
+{{ if site.Params.cactusCommentsSiteName }}
+
+
+
+
+
+
+{{ end }}
diff --git a/layouts/partials/commento.html b/layouts/partials/commento.html
new file mode 100644
index 0000000..6dd39cc
--- /dev/null
+++ b/layouts/partials/commento.html
@@ -0,0 +1,8 @@
+{{ if .Site.Params.commento }}
+
+
+{{ end }}