- <% if (is_home()) { %> <%- partial('home-content') %> diff --git a/scripts/helpers/export-config.js b/scripts/helpers/export-config.js index 80f5606f4..68a516160 100644 --- a/scripts/helpers/export-config.js +++ b/scripts/helpers/export-config.js @@ -25,33 +25,23 @@ hexo.extend.helper.register('exportThemeConfig', function () { } // ----------------------------------------------------------------------- - let hexo_config = { + const hexoConfig = { hostname: url.parse(config.url).hostname || config.url, root: config.root, language: config.language } if (config.search) { - hexo_config.path = config.search.path + hexoConfig.path = config.search.path } - let theme_config = { - toc: theme.toc || {}, - style: theme.style || {}, - local_search: theme.local_search || {}, - code_block: theme.code_block || {}, - pjax: theme.pjax || {}, - lazyload: theme.lazyload || {}, - comment: theme.comment || {}, - post: theme.post || {}, - website_count: theme.website_count || {}, - version: require('../../package.json').version - } + const themeConfig = theme + themeConfig.version = require('../../package.json').version return `