Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ disqusShortname = "your_disqus_shortname"
optin = true #opt-in: true/false

[params]
## Commento Host
#commentoHostname = ""
## Coral Host
#coralHostname = ""
## Remark42 Host
#remarkHostname = ""
#remarkID = ""

# bootswatch theme name, select one: cerulean, cosmo, cyborg, darkly,
# default, flatly, journal, lumen, paper, readable, sandstone, simplex,
# slate, spacelab, superhero, united, yeti.
Expand Down
8 changes: 8 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ errormessage = "Submitting form failed!"
optin = true #opt-in: true/false

[params]
## Commento Host
#commentoHostname = ""
## Coral Host
#coralHostname = ""
## Remark42 Host
#remarkHostname = ""
#remarkID = ""

# bootswatch theme name, unmark and select one: cerulean, cosmo, cyborg, darkly,
# default, flatly, journal, lumen, paper, readable, sandstone, simplex,
# slate, spacelab, superhero, united, yeti.
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/base/metas.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
{{ end }}
{{ end }}

{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Title }}" />
{{ with .Site.Home.AlternativeOutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
<link rel="icon" href="/favicon.png">
{{ .Hugo.Generator }}
{{ hugo.Generator }}
3 changes: 3 additions & 0 deletions layouts/partials/bloc/content/comments.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
{{ partial "modules/disqus.html" . }}
{{ partial "modules/commento.html" . }}
{{ partial "modules/coral.html" . }}
{{ partial "modules/remark.html" . }}
</div>
2 changes: 1 addition & 1 deletion layouts/partials/bloc/content/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<div class="content">
<ul>
{{ range first 10 $value.ByCount }}<li><a href="{{$.LanguagePrefix }}/{{ $key }}/{{ .Name | urlize }}">{{ .Name }}</a></li>{{ end }}
{{ range first 10 $value.ByCount }}<li><a href="{{$.Site.LanguagePrefix }}/{{ $key }}/{{ .Name | urlize }}">{{ .Name }}</a></li>{{ end }}
</ul>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions layouts/partials/foot.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{{ partial "base/footer.html" . }}
{{ partial "base/scripts.html" . }}



</body>
</html>
2 changes: 1 addition & 1 deletion layouts/partials/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ end }}
<div class="row">
<div class="col-sm-{{ if .Site.Params.showRightSidebar }}9{{ else }}12{{ end }}">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ $paginator := .Paginate (where site.RegularPages "Type" "post") }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/modules/commento.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ with .Site.Params.CommentoHostname }}
<div id="commento"></div>
<script type="text/javascript">
(function() {
// Don't ever inject Commento on localhost--it creates unwanted
// discussions from 'localhost:1313' on your Commanto account...
if (window.location.hostname == "localhost")
return;

var dsq = document.createElement('script'); dsq.async = true; dsq.type = 'text/javascript';
dsq.src = '//{{ . }}/js/commento.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the comments powered by <a href="https://commento.io/">Commento</a>.</noscript>
{{ end }}
29 changes: 29 additions & 0 deletions layouts/partials/modules/coral.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ with .Site.Params.CoralHostname }}
<div id="coral_thread"></div>
<script type="text/javascript">
(function() {
if (window.location.hostname == "localhost")
return;
var d = document, s = d.createElement('script');
s.src = 'https://{{ . }}/assets/js/embed.js';
s.async = false;
s.defer = true;
s.onload = function() {
Coral.createStreamEmbed({
id: "coral_thread",
autoRender: true,
rootURL: 'https://{{ . }}',
// 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 }}
17 changes: 17 additions & 0 deletions layouts/partials/modules/remark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{ with .Site.Params.RemarkHostname }}
<div id="remark42"></div>
<script type="text/javascript">
var remark_config = {
host: "https://{{ . }}", // hostname of remark server, same as REMARK_URL in backend config
site_id: '{{ $.Site.Params.RemarkID }}',
components: ['embed'], // optional param; which components to load. default to ["embed"]
// to load all components define components as ['embed', 'last-comments', 'counter']
// available component are:
// - 'embed': basic comments widget
// - 'last-comments': last comments widget, see `Last Comments` section below
// - 'counter': counter widget, see `Counter` section below
};
!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);
</script>
<noscript>Please enable JavaScript to view the comments powered by <a href="https://remark42.com/">Remark42</a>.</noscript>
{{ end }}