|
|
|
<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>
|
|
|
|
<!-- 访问统计 -->
|
|
|
|
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<%- js('js/jquery.fitvids.js') %>
|
|
|
|
<% if (theme.search && theme.search.enable) { %>
|
|
|
|
<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%>" || "hexo";
|
|
|
|
var ROOT = "<%- config.root %>"||"/";
|
|
|
|
if(!ROOT.endsWith('/'))ROOT += '/';
|
|
|
|
</script>
|
|
|
|
<% } %>
|
|
|
|
<%- js('js/search.js') %>
|
|
|
|
<%- js('js/app.js') %>
|
|
|
|
|
|
|
|
<% if (page.comments) { %>
|
|
|
|
<% 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>
|
|
|
|
<% } %>
|
|
|
|
<% if (config.livere_uid){ %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function(d, s) {
|
|
|
|
var j, e = d.getElementsByTagName(s)[0];
|
|
|
|
if (typeof LivereTower === 'function') { return; }
|
|
|
|
j = d.createElement(s);
|
|
|
|
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
|
|
|
j.async = true;
|
|
|
|
e.parentNode.insertBefore(j, e);
|
|
|
|
})(document, 'script');
|
|
|
|
</script>
|
|
|
|
<% } %>
|
|
|
|
<% if (config.valine){ %>
|
|
|
|
<% if (config.valine.enable && config.valine.appId && config.valine.appKey){ %>
|
|
|
|
<script>
|
|
|
|
var GUEST_INFO = ['nick','mail','link'];
|
|
|
|
var guest_info = '<%= config.valine.guest_info %>'.split(',').filter(function(item){
|
|
|
|
return GUEST_INFO.indexOf(item) > -1
|
|
|
|
});
|
|
|
|
var notify = '<%= config.valine.notify %>' == true;
|
|
|
|
var verify = '<%= config.valine.verify %>' == true;
|
|
|
|
var valine = new Valine();
|
|
|
|
valine.init({
|
|
|
|
el: '#valine_container',
|
|
|
|
notify: notify,
|
|
|
|
verify: verify,
|
|
|
|
guest_info: guest_info,
|
|
|
|
appId: "<%= config.valine.appId %>",
|
|
|
|
appKey: "<%= config.valine.appKey %>",
|
|
|
|
placeholder: "<%= config.valine.placeholder %>",
|
|
|
|
pageSize:'<%= config.valine.pageSize %>',
|
|
|
|
avatar:'<%= config.valine.avatar %>',
|
|
|
|
lang:'<%= config.valine.lang %>',
|
|
|
|
highlight:'<%= config.valine.highlight %>'
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|