Skip to content

Commit 7a8065c

Browse files
committed
The code was refactored to use the Injector function and remove the reander function
1 parent 4dc3d27 commit 7a8065c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
var fs = require('fs');
2-
hexo.extend.filter.register('before_post_render', function(data){
3-
var file_content = fs.readFileSync('./node_modules/hexo-baidu-url-push/push.js');
4-
data.content += file_content;
5-
return data;
6-
});
2+
hexo.extend.injector.register('head_begin',function(push){
3+
var push = fs.readFileSync('./node_modules/hexo-baidu-url-push/push.js');
4+
return push;});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
"scripts": {
2323
"test": "echo \"Error: no test specified\" && exit 1"
2424
},
25-
"version": "0.1.4"
25+
"version": "0.1.5"
2626
}

0 commit comments

Comments
 (0)