anzhiyu-c / hexo-theme-anzhiyu

安知鱼主题,这是一个简洁美丽的hexo主题。
GNU General Public License v3.0
1.46k stars 217 forks source link

[Bug]: hexo g生成时报错 #51

Closed Mitpoppy closed 1 year ago

Mitpoppy commented 1 year ago

使用的 AnZhiYu 版本? | What version of AnZhiYu are you use?

1.2.1

使用的浏览器? || What browse are you using?

Edge

是否修改过主题文件? || Has the theme files been modified?

不是 (No)

使用的系统? || What operating system are you using?

Windows

问题描述 | Describe the bug

ERROR
TypeError: D:\gc\blog-source\themes\anzhiyu\layout\includes\page\flink.pug:3
    1| #article-container
    2|   - let totalLinks = 0;
  > 3|   each item in site.data.link
    4|     - totalLinks += item.link_list.length
    5|   if totalLinks >= 50
    6|     #flink-banners

Cannot read properties of undefined (reading 'length')
    at eval (eval at wrap (D:\gc\blog-source\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:1862:32)
    at eval (eval at wrap (D:\gc\blog-source\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:1877:4)
    at template (eval at wrap (D:\gc\blog-source\node_modules\pug-runtime\wrap.js:6:10), <anonymous>:13628:7)
    at _View._compiled (D:\gc\blog-source\node_modules\hexo\lib\theme\view.js:136:50)
    at _View.render (D:\gc\blog-source\node_modules\hexo\lib\theme\view.js:39:17)
    at D:\gc\blog-source\node_modules\hexo\lib\hexo\index.js:64:21
    at tryCatcher (D:\gc\blog-source\node_modules\bluebird\js\release\util.js:16:23)
    at D:\gc\blog-source\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (D:\gc\blog-source\node_modules\hexo\lib\hexo\router.js:47:5)
    at Readable.read (node:internal/streams/readable:496:12)
    at resume_ (node:internal/streams/readable:999:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

出现问题的网站 | Website

本地生成

Mitpoppy commented 1 year ago

原来的主题link文件忘记删了,已解决