xaoxuu / hexo-theme-stellar

内置文档系统的简约商务风Hexo主题,支持大量的标签组件和动态数据组件。
https://xaoxuu.com/wiki/stellar/
MIT License
1.26k stars 313 forks source link

7.1.0hexo安装 stellar报错theme.menubar.items is not iterable #363

Closed ehtanio closed 7 months ago

ehtanio commented 7 months ago

按照文档说明,安装stellar后,执行hexo general时报错,错误信息如下: 对应版本信息为:hexo: 7.1.0、hexo-cli: 4.3.1、node: 16.16.0、npm:8.11.0 INFO Validating config Inferno is in development mode. INFO Welcome to Stellar 1.26.0 DOCS https://xaoxuu.com/wiki/stellar/ REPO https://github.com/xaoxuu/hexo-theme-stellar.git INFO Start processing INFO Files loaded in 132 ms ERROR Render HTML failed: 404.html TypeError: E:\myblog\node_modules\hexo-theme-stellar\layout\layout.ejs:1

1| <% 2| // 页面类型:索引页面还是内容页面 3| var page_type = 'index' 4| if (['post', 'page', 'wiki', null].includes(page.layout)) {

E:\myblog\node_modules\hexo-theme-stellar\layout_partial\sidebar\index.ejs:149 147| %> 148| <%- layoutLogo() %>

149| <%- layoutNavArea() %> 150| <%- layoutWidgets() %> 151| <%- layoutFooterDiv() %> 152|

E:\myblog\node_modules\hexo-theme-stellar\layout_partial\sidebar\menu.ejs:32 30| %> 31|

32| <%- layoutDiv() %> 33|

theme.menubar.items is not iterable at layoutDiv ("E:\myblog\node_modules\hexo-theme-stellar\layout\_partial\sidebar\menu.ejs":14:34) at eval ("E:\myblog\node_modules\hexo-theme-stellar\layout\_partial\sidebar\menu.ejs":43:17) at menu (E:\myblog\node_modules\ejs\lib\ejs.js:703:17) at _View._compiledSync (E:\myblog\node_modules\hexo\dist\theme\view.js:120:32) at _View.renderSync (E:\myblog\node_modules\hexo\dist\theme\view.js:62:29) at Object.partial (E:\myblog\node_modules\hexo\dist\plugins\helper\partial.js:27:17) at layoutNavArea ("E:\myblog\node_modules\hexo-theme-stellar\layout\_partial\sidebar\index.ejs":152:9) at eval ("E:\myblog\node_modules\hexo-theme-stellar\layout\_partial\sidebar\index.ejs":163:17) at index (E:\myblog\node_modules\ejs\lib\ejs.js:703:17) at _View._compiledSync (E:\myblog\node_modules\hexo\dist\theme\view.js:120:32) at _View.renderSync (E:\myblog\node_modules\hexo\dist\theme\view.js:62:29) at Object.partial (E:\myblog\node_modules\hexo\dist\plugins\helper\partial.js:27:17) at eval ("E:\myblog\node_modules\hexo-theme-stellar\layout\layout.ejs":45:19) at layout (E:\myblog\node_modules\ejs\lib\ejs.js:703:17) at _View._compiled (E:\myblog\node_modules\hexo\dist\theme\view.js:123:67) at _View.render (E:\myblog\node_modules\hexo\dist\theme\view.js:48:21) at E:\myblog\node_modules\hexo\dist\theme\view.js:55:31 at tryCatcher (E:\myblog\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (E:\myblog\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (E:\myblog\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (E:\myblog\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (E:\myblog\node_modules\bluebird\js\release\promise.js:729:18) at _drainQueueStep (E:\myblog\node_modules\bluebird\js\release\async.js:93:12)

image

xaoxuu commented 7 months ago

这是一个已知问题,将会在下个版本修复,现在需要先在 _config.stellar.yml 中设置一下:

menubar:
  items: []
xaoxuu commented 7 months ago

563385226706416295c06fb6c47628d482be9fc9

github-actions[bot] commented 7 months ago

:wave: Hello, This bug has been fixed, please update your stellar.

:wave: 您好, 此 BUG 已经被修复,请更新您的 Stellar 版本。

xaoxuu commented 7 months ago

1.26.1 已修复