{{ with .Site.DisqusShortname }}
<script type="text/javascript">
  (function() {
    // Don't ever inject Disqus on localhost--it creates unwanted
    // discussions from 'localhost:1313' on your Disqus account...
    if (window.location.hostname == "localhost")
      return;

    var dsq = document.createElement('script'); dsq.async = true; dsq.type = 'text/javascript';
    dsq.src = '//{{ . }}.disqus.com/count.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>
{{ end }}

{{ with .Site.Params.highlight }}
<script src="{{ "/js/highlight.pack.js" | absURL }}"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ end }}

{{ with .Site.DisqusShortname }}
<script type="text/javascript">
  (function() {
    // Don't ever inject Disqus on localhost--it creates unwanted
    // discussions from 'localhost:1313' on your Disqus account...
    if (window.location.hostname == "localhost")
      return;

    var dsq = document.createElement('script'); dsq.async = true; dsq.type = 'text/javascript';
    dsq.src = '//{{ . }}.disqus.com/count.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>
{{ end }}

{{ with .Site.Params.highlight }}
<script src="{{ $baseurl}}js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ end }}

Fix broken js when using a sub directory
Fix broken js when using a sub directory
