新增插件
参照hexo的官方文档,或者我之前的插件博文。
修改index.js
1 2 3
| hexo.extend.console.register('test', 'this is for test purpose ONLY', function(args){ console.log("Hexo-YOUR-PLUGIN: test option received"); })
|
使用
如果只是本地测试,只要放到node_modules目录即可。
当然,你也可以发布到nodeJS.
测试
应该可以看到 test 选项了。
AD