diff --git a/layout/_partial/plugins/local-search.ejs b/layout/_partial/plugins/local-search.ejs deleted file mode 100644 index 44d19471..00000000 --- a/layout/_partial/plugins/local-search.ejs +++ /dev/null @@ -1,14 +0,0 @@ -<% if(theme.search.enable){ %> - <%- js_ex(theme.static_prefix.internal_js, 'local-search.js') %> - -<% } %> diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index a7ebf3e9..805407fd 100644 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -44,6 +44,10 @@ <%- js_ex(theme.static_prefix.clipboard, 'clipboard.min.js', 'defer') %> <% } %> +<% if(theme.search.enable){ %> + <%- js_ex(theme.static_prefix.internal_js, 'local-search.js') %> +<% } %> + <% if ((theme.footer.statistics.enable && theme.footer.statistics.source === 'busuanzi') || (page.meta !== false && theme.post.meta.views.enable && theme.post.meta.views.source === 'busuanzi')) { %> <%- js_ex(theme.static_prefix.busuanzi, 'busuanzi.pure.mini.js', 'defer') %> @@ -57,7 +61,6 @@ <% } %> <%- partial('_partial/plugins/typed.ejs') %> -<%- partial('_partial/plugins/local-search.ejs') %> <%- partial('_partial/plugins/math.ejs') %> <%- partial('_partial/plugins/mermaid.ejs') %> <%- partial('_partial/plugins/analytics.ejs') %> diff --git a/scripts/helpers/export-config.js b/scripts/helpers/export-config.js index b536ae89..6abb284a 100644 --- a/scripts/helpers/export-config.js +++ b/scripts/helpers/export-config.js @@ -20,7 +20,8 @@ hexo.extend.helper.register('export_config', function() { image_zoom : theme.post.image_zoom, toc : theme.post.toc, lazyload : theme.lazyload, - web_analytics: theme.web_analytics + web_analytics: theme.web_analytics, + search_path : theme.search.path }; return `