Release v8.0.0-rc.5

This commit is contained in:
Mimi 2020-08-01 08:56:17 +08:00
parent 016487efa3
commit 74ccc182f3
3 changed files with 9 additions and 16 deletions

View File

@ -1,6 +1,6 @@
{
"name": "hexo-theme-next",
"version": "8.0.0-rc.4",
"version": "8.0.0-rc.5",
"description": "Elegant and powerful theme for Hexo.",
"main": "package.json",
"scripts": {

View File

@ -6,9 +6,6 @@ hexo.extend.filter.register('after_generate', () => {
const theme = hexo.theme.config;
if (!theme.minify) return;
const lists = hexo.route.list();
const fontawesome = lists.filter(list => list.includes('lib/font-awesome'));
if (!theme.bookmark.enable) {
hexo.route.remove('js/bookmark.js');
}
@ -16,15 +13,14 @@ hexo.extend.filter.register('after_generate', () => {
if (!theme.motion.enable) {
hexo.route.remove('js/motion.js');
hexo.route.remove('lib/animate-css/animate.min.css');
}
if (theme.motion.enable && theme.vendors.animate_css) {
} else if (theme.vendors.animate_css) {
hexo.route.remove('lib/animate-css/animate.min.css');
}
if (theme.vendors.fontawesome) {
fontawesome.forEach(path => {
hexo.route.remove(path);
const lists = hexo.route.list();
lists.forEach(path => {
if (path.startsWith('lib/font-awesome')) hexo.route.remove(path);
});
}
@ -40,9 +36,7 @@ hexo.extend.filter.register('after_generate', () => {
hexo.route.remove('js/local-search.js');
}
if (theme.scheme === 'Muse' || theme.scheme === 'Mist') {
hexo.route.remove('js/schemes/pisces.js');
} else if (theme.scheme === 'Pisces' || theme.scheme === 'Gemini') {
if (theme.scheme === 'Pisces' || theme.scheme === 'Gemini') {
hexo.route.remove('js/schemes/muse.js');
}
});

View File

@ -26,17 +26,16 @@ hexo.extend.helper.register('next_config', function() {
motion : theme.motion,
prism : config.prismjs.enable && !config.prismjs.preprocess
};
if (theme.algolia_search && theme.algolia_search.enable) {
config.algolia = config.algolia || {};
if (config.algolia && theme.algolia_search && theme.algolia_search.enable) {
exportConfig.algolia = {
appID : config.algolia.applicationID,
appID : config.algolia.applicationID || config.algolia.appId,
apiKey : config.algolia.apiKey,
indexName: config.algolia.indexName,
hits : theme.algolia_search.hits,
labels : theme.algolia_search.labels
};
}
if (config.search) {
if (config.search && theme.local_search && theme.local_search.enable) {
exportConfig.path = config.search.path;
exportConfig.localsearch = theme.local_search;
}