added initial support for cactus comments, put commento comments in its own partial
This commit is contained in:
parent
a260f04d1d
commit
d7cc1a9192
|
@ -76,6 +76,11 @@ summaryLength = 70 # number of words for article summaries
|
||||||
# enable comments support with commento using the script from your server
|
# enable comments support with commento using the script from your server
|
||||||
commento = "https://example.com/js/commento.js"
|
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
|
# enable analytics using Plausible
|
||||||
plausibleScriptUrl = "https://something.com/..."
|
plausibleScriptUrl = "https://something.com/..."
|
||||||
plausibleDomain = "example.com"
|
plausibleDomain = "example.com"
|
||||||
|
|
|
@ -26,13 +26,7 @@
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- partial "inject/content-after.html" . -}}
|
{{- partial "inject/content-after.html" . -}}
|
||||||
{{ if .Site.Params.commento }}
|
{{- partial "commento.html" . -}}
|
||||||
<script
|
{{- partial "cactus_chat.html" . -}}
|
||||||
defer
|
|
||||||
src="{{ .Site.Params.commento }}"
|
|
||||||
data-no-fonts="true"
|
|
||||||
></script>
|
|
||||||
<div id="commento"></div>
|
|
||||||
{{ end }}
|
|
||||||
{{- partial "related_articles.html" . -}}
|
{{- partial "related_articles.html" . -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{{ if site.Params.cactusCommentsSiteName }}
|
||||||
|
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
|
||||||
|
|
||||||
|
<div id="ficurinia-cactus-comments"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
initComments({
|
||||||
|
node: document.getElementById("ficurinia-cactus-comments"),
|
||||||
|
defaultHomeserverUrl: '{{ site.Params.cactusCommentsHomeserver | default "https://matrix.cactus.chat:8448" }}',
|
||||||
|
serverName: '{{ site.Params.cactusCommentsServerName | default "cactus.chat" }}',
|
||||||
|
siteName: "{{ site.Params.cactusCommentsSiteName }}",
|
||||||
|
commentSectionId: "{{ .File.UniqueID }}"
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{{ if .Site.Params.commento }}
|
||||||
|
<script
|
||||||
|
defer
|
||||||
|
src="{{ .Site.Params.commento }}"
|
||||||
|
data-no-fonts="true"
|
||||||
|
></script>
|
||||||
|
<div id="commento"></div>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue