jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly
https://butterfly.js.org
Apache License 2.0
7.12k stars 1.28k forks source link

友链那里设置失效 #59

Closed suntianc closed 4 years ago

suntianc commented 4 years ago

hexo: 4.0.0 hexo-cli: 3.1.0 设置 typ:“link” 报错,换成“flink”成功 然后 友链界面设置失效

jerryc127 commented 4 years ago

设置 typ:“link” 报错 报什么错?

suntianc commented 4 years ago

Unhandled rejection TypeError: C:\Users\hp\SuntcHome.github.io\themes\Butterfly\layout\flink.pug:6 4| .post-cards 5| ul.md-links

6| each item in i.link_list 7| li.md-links-item 8| a(href=item.link title=item.name target="_blank") 9| if theme.lazyload.enable Cannot read property 'length' of undefined

suntianc commented 4 years ago

这个是全的: Unhandled rejection TypeError: C:\Users\hp\SuntcHome.github.io\themes\Butterfly\layout\flink.pug:6 4| .post-cards 5| ul.md-links

6| each item in i.link_list 7| li.md-links-item 8| a(href=item.link title=item.name target="_blank") 9| if theme.lazyload.enable

Cannot read property 'length' of undefined at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2194:32) at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2251:4) at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2256:4) at template (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :9242:72) at Theme._View.View._compiled (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\theme\view.js:29:15) at C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\hexo\index.js:365:21 at tryCatcher (C:\Users\hp\SuntcHome.github.io\node_modules\bluebird\js\release\util.js:16:23) at C:\Users\hp\SuntcHome.github.io\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\hexo\router.js:123:3) at RouteStream.Readable.read (_streamreadable.js:490:10) at resume (_stream_readable.js:975:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) Unhandled rejection TypeError: C:\Users\hp\SuntcHome.github.io\themes\Butterfly\layout\flink.pug:6 4| .post-cards 5| ul.md-links

6| each item in i.link_list 7| li.md-links-item 8| a(href=item.link title=item.name target="_blank") 9| if theme.lazyload.enable

Cannot read property 'length' of undefined at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2194:32) at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2251:4) at eval (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :2256:4) at template (eval at wrap (C:\Users\hp\SuntcHome.github.io\node_modules\pug-runtime\wrap.js:6:10), :9242:72) at Theme._View.View._compiled (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\theme\view.js:123:48) at Theme._View.View.View.render (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\theme\view.js:29:15) at C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\hexo\index.js:365:21 at tryCatcher (C:\Users\hp\SuntcHome.github.io\node_modules\bluebird\js\release\util.js:16:23) at C:\Users\hp\SuntcHome.github.io\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (C:\Users\hp\SuntcHome.github.io\node_modules\hexo\lib\hexo\router.js:123:3) at RouteStream.Readable.read (_streamreadable.js:490:10) at resume (_stream_readable.js:975:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

suntianc commented 4 years ago

关键我还没配置link.yml,只是 hexo new page link,然后 type: "link" 启动 hexo 点击友链,就报这错

suntianc commented 4 years ago

问题解决了,配置问题,谢谢

xiaohuimc commented 4 years ago

老哥怎么解决的,我也遇到这个问题

$ hexo s -p 80 INFO Start processing INFO Hexo is running at http://localhost:80 . Press Ctrl+C to stop. Unhandled rejection TypeError: D:\Program Files\Git\Code\hexo\huobi\themes\Butterfly\layout\flink.pug:2 1| .flink

2| each i in site.data.link 3| h1= i.class_name 4| .post-cards 5| ul.md-links

xiaohuimc commented 4 years ago

不知道哪里出错