blog/themes/hugo-uno/layouts/partials/comments.html

38 lines
1.3 KiB
HTML

{{ if .Site.Params.muut }}
<section class="post-comments">
<a class="muut" href="https://muut.com/i/{{ .Site.Params.muut }}/comments:{{ .Title }}">Comments</a>
<script src="//cdn.muut.com/1/moot.min.js"></script>
</section>
{{ end }}
{{ if .Site.Params.discourse }}
<div id="discourse-comments"></div>
<script type="text/javascript">
var discourseUrl = {{ .Site.Params.discourse }},
discourseEmbedUrl = {{ .Permalink }};
(function() {
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
d.src = discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
})();
</script>
{{ end }}
{{ if .Site.Params.disqus }}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqusUsername = {{ .Site.Params.disqus }};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//' + disqusUsername + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{{ end }}