Integrated custom disqus template

This commit is contained in:
Thomas Boerger 2016-12-12 14:33:56 +01:00
parent 1b3ecd91c7
commit 68b2be4eb8
No known key found for this signature in database
GPG Key ID: 5A388F55283960B6
6 changed files with 29 additions and 5 deletions

View File

@ -9,7 +9,7 @@
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>

View File

@ -11,7 +11,7 @@
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>

View File

@ -11,7 +11,7 @@
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>

View File

@ -0,0 +1,24 @@
{{ if .Site.DisqusShortname }}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ .Site.DisqusShortname }}';
var disqus_identifier = '{{ .Permalink }}';
var disqus_title = '{{ .Title }}';
var disqus_url = '{{ .Permalink }}';
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
{{end}}

View File

@ -51,7 +51,7 @@
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>

View File

@ -28,7 +28,7 @@
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>