<% if (config.disqus_shortname){ %>
<script>
  var disqus_shortname = '<%= config.disqus_shortname %>';
  <% if (page.permalink){ %>
  var disqus_url = '<%= page.permalink %>';
  <% } %>
  (function(){
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>
<% } %>

<%- partial('post/mathjax.ejs') %>

<% if (theme.fancybox){ %>
  <%- css('https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css') %>
  <%- js('https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js') %>
<% } %>

<%- js('js/scripts') %>
<%- js('https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js') %>
<%- js('js/main') %>

<%- partial('google-analytics') %>
<%- partial('gauges-analytics') %>
<%- partial('cnzz-analytics') %>
<%- partial('busuanzi-analytics') %>
<%- partial('baidu-analytics') %>
<%- partial('tencent-analytics') %>