Include Disqus script only if shortname is present in _config.yml

This commit is contained in:
Michael Rose 2014-03-26 15:54:01 -04:00
parent 77f5b6498d
commit 6b099119bb

View file

@ -1,3 +1,4 @@
{% if site.disqus_shortname %}
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
@ -18,4 +19,5 @@
}());
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% endif %}