mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 22:55:31 -04:00
re-organize a bunch of partials
This commit is contained in:
22
layouts/partials/scripts/disqus.html
Normal file
22
layouts/partials/scripts/disqus.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if ne .Params.comments false }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="application/javascript">
|
||||
var disqus_config = function () {
|
||||
this.page.title = '{{ $.Title }}';
|
||||
this.page.url = '{{ $.Permalink }}';
|
||||
this.page.identifier = '{{ $.Permalink }}';
|
||||
};
|
||||
(function() {
|
||||
// Don't clutter Disqus account with localhost URLs.
|
||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) return;
|
||||
|
||||
var d = document, s = d.createElement('script'); s.async = true;
|
||||
s.src = 'https://' + {{ $.Site.DisqusShortname }} + '.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 }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user