28 lines
947 B
HTML
28 lines
947 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><em>Disqus comments are disabled.</em></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>
|