hexo-theme-amane/scripts/index.js

33 lines
1.0 KiB
JavaScript
Raw Normal View History

2018-10-16 05:28:42 +00:00
require('../includes/tasks/welcome');
require('../includes/tasks/check_deps');
require('../includes/tasks/check_config');
require('../includes/generators/categories')(hexo);
require('../includes/generators/category')(hexo);
require('../includes/generators/tags')(hexo);
require('../includes/generators/insight')(hexo);
require('../includes/helpers/cdn')(hexo);
require('../includes/helpers/config')(hexo);
require('../includes/helpers/layout')(hexo);
require('../includes/helpers/override')(hexo);
require('../includes/helpers/page')(hexo);
require('../includes/helpers/site')(hexo);
// Fix large blog rendering OOM
const hooks = [
'after_render:html',
'after_post_render'
]
const filters = [
'hexoMetaGeneratorInject',
'externalLinkFilter'
];
hooks.forEach(hook => {
hexo.extend.filter.list()[hook]
.filter(filter => filters.includes(filter.name))
.forEach(filter => hexo.extend.filter.unregister(hook, filter));
});
2018-10-16 05:28:42 +00:00
// Debug helper
hexo.extend.helper.register('console', function () {
console.log(arguments)
});