hexo配置主题不成功

问题遇到的现象和发生背景

因为很喜欢https://github.com/xadillax/hexo-xnew这个主题,所以换主题的时候,将它下载下来放到theme里,并修改_config.fml文件中theme之后,出现我的网站先是:

img


后直接空白,且用hexo s的时候,localhost也一直加载不了。

img

问题相关代码,请勿粘贴截图
hexo s
运行结果及报错内容
Unhandled rejection TypeError: /Users/hoshea/Downloads/hexoTest/themes/hexo-xnew-master/layout/_header.pug:9
    7| nav
    8|   ul
  > 9|     each url, label in theme.menu
    10|       li
    11|         a(href= url, alt= label, title= label)= label
    12| 

Cannot read properties of undefined (reading 'length')
    at eval (eval at wrap (/Users/hoshea/Downloads/hexoTest/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:113:32)
    at eval (eval at wrap (/Users/hoshea/Downloads/hexoTest/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:136:4)
    at template (eval at wrap (/Users/hoshea/Downloads/hexoTest/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:910:99)
    at _View._compiled (/Users/hoshea/Downloads/hexoTest/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/Users/hoshea/Downloads/hexoTest/node_modules/hexo/lib/theme/view.js:39:17)
    at /Users/hoshea/Downloads/hexoTest/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/Users/hoshea/Downloads/hexoTest/node_modules/bluebird/js/release/util.js:16:23)
    at /Users/hoshea/Downloads/hexoTest/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/Users/hoshea/Downloads/hexoTest/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (node:internal/streams/readable:487:10)
    at resume_ (node:internal/streams/readable:987:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
我的解答思路和尝试过的方法

安装pug解析,不成功;修改menu,不成功。

我想要达到的结果

成功配置主题