diff --git a/assets/js/cactus.js.tmpl b/assets/js/cactus.js.tmpl new file mode 100644 index 0000000..2f34d98 --- /dev/null +++ b/assets/js/cactus.js.tmpl @@ -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. +}) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4a2431b..f58a4ec 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,6 +14,7 @@ {{ with .Site.Params.author }}{{ end }} {{ $style := resources.Get "style/main.sass" | resources.ToCSS }} + {{ if .Site.Params.comments.cactus }}{{ end }} {{ with .OutputFormats.Get "RSS" -}} {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} {{- end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 31ff3f3..f6805df 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -2,6 +2,7 @@