<% 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>
<% } %>

<script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src='//cdn.bootcss.com/node-waves/0.7.5/waves.min.js'></script>
<script src="//cdn.bootcss.com/scrollReveal.js/3.3.2/scrollreveal.min.js"></script>
<%- js('js/jquery.fitvids.js') %>
<script>
	var GOOGLE_CUSTOM_SEARCH_API_KEY = "<%- theme.search.google_api_key %>";
	var GOOGLE_CUSTOM_SEARCH_ENGINE_ID = "<%- theme.search.google_engine_id %>";
	var ALGOLIA_API_KEY = "<%- theme.search.algolia_api_key %>";
	var ALGOLIA_APP_ID = "<%- theme.search.algolia_app_id %>";
	var ALGOLIA_INDEX_NAME = "<%- theme.search.algolia_index_name %>";
  var AZURE_SERVICE_NAME = "<%- theme.search.azure_service_name %>";
  var AZURE_INDEX_NAME = "<%- theme.search.azure_index_name %>";
  var AZURE_QUERY_KEY = "<%- theme.search.azure_query_key %>";
  var BAIDU_API_ID = "<%- theme.search.baidu_api_id %>";
  var SEARCH_SERVICE = "<%- theme.search.service %>";
  var ROOT = "<%- config.root %>"||"/";
  if(!ROOT.endsWith('/'))ROOT += '/';
</script>
<%- js('js/search.js') %>
<%- js('js/app.js') %>

