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);
|
|
|
|
|
2019-08-15 04:05:21 +00:00
|
|
|
// Fix large blog rendering OOM
|
2019-12-20 20:26:49 +00:00
|
|
|
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));
|
|
|
|
});
|
2019-08-15 04:05:21 +00:00
|
|
|
|
2018-10-16 05:28:42 +00:00
|
|
|
// Debug helper
|
|
|
|
hexo.extend.helper.register('console', function () {
|
|
|
|
console.log(arguments)
|
|
|
|
});
|