[hexojs/hexo]关于过滤source/*.yaml文件

2024-07-23 932 views
6

在source下需要保留个以.yaml后缀的文件,一旦渲染就崩溃,求解决方案,skip_render参数姿势不对?

回答

5

直接写*.yaml试试看

3

skip_render: "*.yaml"崩溃了。。

2
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: Cannot read property 'toString' of undefined
    at toString (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/lib/hexo/render.js:112:20)
    at /home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/lib/hexo/render.js:53:14
    at tryCatcher (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:581:18)
    at Promise._settlePromises (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:697:14)
    at Async._drainQueue (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/netcan/WorkSpace/Netcan_Web/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)
3

我发现只要有.yaml文件就会出现上面那样的错误, 其他类型文件可以过滤。

1

这可能是一个BUG,我回头确认一下

8

已解决= =,当.yaml文件不为空时正常,如果为空就崩溃。。