Initial Cactus Comments implementation
This commit is contained in:
parent
c3be616e1e
commit
8b15b6b220
|
@ -0,0 +1,7 @@
|
|||
initComments({
|
||||
node: document.getElementById("cactus-comments"), // HTML element to make comments section in
|
||||
defaultHomeserverUrl: "https://matrix.cactus.chat:8448", // full url of the Matrix server to use as guest
|
||||
serverName: "cactus.chat", // server name of the Matrix server w/ Cactus Appservice
|
||||
siteName: "{{ .Site.Params.comments.cactus }}", // the name that you registered with the cactus appservice
|
||||
commentSectionId: "{{ .Page.Permalink }}" // unique ID for this comments section.
|
||||
})
|
|
@ -14,6 +14,7 @@
|
|||
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
{{ $style := resources.Get "style/main.sass" | resources.ToCSS }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
{{ if .Site.Params.comments.cactus }}<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||
{{- end }}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div class="columns">
|
||||
<div class="column is-8 is-offset-2">
|
||||
{{ partial "comments/webmention" . }}
|
||||
{{ partial "comments/cactus" . }}
|
||||
{{ with .Site.DisqusShortname }}
|
||||
<div>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{{ if .Site.Params.comments.cactus }}
|
||||
<hr />
|
||||
<div class="content">
|
||||
<h2>Comments</h2>
|
||||
</div>
|
||||
<div id="cactus-comments"></div>
|
||||
{{ end }}
|
|
@ -1,7 +1,7 @@
|
|||
{{ if .Site.Params.comments.webmention }}
|
||||
<hr />
|
||||
<div class="content">
|
||||
<h2>Comments</h2>
|
||||
<h2>Webmentions</h2>
|
||||
<form method="get" action="https://quill.p3k.io/" target="_blank"><input type="hidden" name="dontask" value="1">
|
||||
<input type="hidden" name="me" value="https://commentpara.de/">
|
||||
<input type="hidden" name="reply" value="{{ .Permalink }}">
|
||||
|
|
|
@ -6,3 +6,8 @@
|
|||
data-page-url="{{ .Permalink }}"
|
||||
async></script>
|
||||
{{ end }}
|
||||
{{ if .Site.Params.comments.cactus }}
|
||||
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
|
||||
{{ $cactus_js := resources.Get "js/cactus.js.tmpl" | resources.ExecuteAsTemplate "js/cactus.js" . }}
|
||||
<script src="{{ $cactus_js.RelPermalink }}" async></script>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue