feat: WordCount

This commit is contained in:
沈宇
2020-01-07 14:05:02 +08:00
parent 758b378e82
commit ca99e5de86
9 changed files with 148 additions and 4 deletions

25
scripts/lib/core.js Normal file
View File

@@ -0,0 +1,25 @@
/* global hexo */
'use strict';
// Hexo事件:https://hexo.io/zh-cn/api/events
/** 在静态文件生成前发布 */
hexo.on('generateBefore', () => {
// Merge config.
//require('./../filters/index')(hexo);
});
/** 在文章文件建立后发布。该事件返回文章参数。 */
hexo.on('new', function (post) {
//console.log(post)
});
/** 在文章开始渲染前执行 */
hexo.extend.filter.register('before_post_render', function (data) {
//var config = hexo.config;
//console.log(3);
//console.log(config);
//console.log(hexo.theme.config);
});