mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Release v8.0.0-rc.5
This commit is contained in:
parent
016487efa3
commit
74ccc182f3
@ -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": {
|
||||
|
||||
@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user