Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/surajmandalcell/potato-dark.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Mandal <surajmandalcell@gmail.com>2019-09-15 01:14:40 +0300
committerGitHub <noreply@github.com>2019-09-15 01:14:40 +0300
commit8aa2a68ac853b40e905a0f848a413e84c2fbbc25 (patch)
treecb37c681b8c6751ea9273f9471b7486f98cd615c
parenteaed5993ff70bc9987c264d7af65b6036c28be80 (diff)
parentfa40ec7e2b846dbbe654835b24051e0ee45fd347 (diff)
Merge pull request #6 from mzch/master
Add Coral (Talk v5) comment engine
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/single.html46
-rw-r--r--layouts/partials/head_custom.html1
3 files changed, 40 insertions, 11 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 61177d4..2d40f7b 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -27,7 +27,9 @@ copyright = "&copy; Copyright notice"
# Disqus shortname
disqus = ""
# Commento Host
- commento = ""
+ #commento = ""
+ # Coral (Talk v5) Host
+ #coral = ""
# Google Analytics API key.
ga_api_key = "Your Google Analytics tracking id"
# Logo image. This is displayed ogp image.
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b750cda..5ff9718 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -36,16 +36,42 @@
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
{{ with .Site.Params.commento }}
- <div id="commento"></div>
- <script defer>
- var commento_url = {{ . }};
- (function() {
- var d = document, s = d.createElement('script');
- s.src = 'https://' + commento_url + '/js/commento.js';
- (d.head || d.body).appendChild(s);
- })();
- </script>
- <noscript>Please enable JavaScript to view the comments powered by Commento.</a></noscript>
+ <div id="commento"></div>
+ <script defer>
+ var commento_url = {{ . }};
+ (function() {
+ var d = document, s = d.createElement('script');
+ s.src = 'https://' + commento_url + '/js/commento.js';
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>.</noscript>
+ {{ end }}
+ {{ with .Site.Params.coral }}
+ <div id="coral_thread"></div>
+ <script type="text/javascript">
+ var coral_url = {{ . }}
+ (function() {
+ var d = document, s = d.createElement('script');
+ s.src = 'https://' + coral_url + '/assets/js/embed.js';
+ s.onload = function() {
+ Coral.createStreamEmbed({
+ id: "coral_thread",
+ autoRender: true,
+ rootURL: 'https://' + coral_url,
+ // Uncomment these lines and replace with the ID of the
+ // story's ID and URL from your CMS to provide the
+ // tightest integration. Refer to our documentation at
+ // https://docs.coralproject.net for all the configuration
+ // options.
+ // storyID: '${storyID}',
+ // storyURL: '${storyURL}',
+ });
+ };
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the comments powered by <a href="https://coralproject.net/">Coral</a>.</noscript>
{{ end }}
<nav class="p-pagination c-pagination">
<div class="c-pagination__ctrl">
diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html
index a76e9a6..65245f4 100644
--- a/layouts/partials/head_custom.html
+++ b/layouts/partials/head_custom.html
@@ -2,3 +2,4 @@
If you want to include any custom html just before </head>, put it in /layouts/head_custom.html
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/head_custom.html doesn't exist.
-->
+<link rel="canonical" href="{{ .Permalink }}"> \ No newline at end of file