28 lines
938 B
HTML
28 lines
938 B
HTML
<div id="disqus-container">
|
|
{{ with .Site.DisqusShortname }}
|
|
<button id="disqus-button" onclick="showComments()">Show comments</button>
|
|
<div id="disqus-comments">
|
|
{{ $isDummyName := eq . "yourdiscussshortname" }}
|
|
{{ $isServer := $.Site.IsServer }}
|
|
{{ if or $isDummyName $isServer }}
|
|
<p>Disqus comments are disabled.</p>
|
|
<script type="application/javascript">
|
|
function showComments() {
|
|
{{ partial "disqus-js-common.js" . | safeJS }}
|
|
}
|
|
</script>
|
|
{{ else }}
|
|
<div id="disqus_thread">
|
|
</div>
|
|
<script type="application/javascript">
|
|
function showComments() {
|
|
{{ partial "disqus-js-main.js" . | safeJS }}
|
|
{{ partial "disqus-js-common.js" . | safeJS }}
|
|
}
|
|
</script>
|
|
{{ end }}
|
|
<noscript>Enable JavaScript to view Disqus comments.</noscript>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|