SukkaW / hexo-theme-suka

🎨Modern, powerful and simple theme for Hexo.
https://theme-suka.skk.moe
GNU General Public License v3.0
609 stars 49 forks source link

`_config.yml` 包含多語言时 `hexo generate` 報错 #128

Open cmp0xff opened 4 years ago

cmp0xff commented 4 years ago

I certify that I have first consulted (check with "x")

我确认我已经查看了 (选择时请使用 "x" 取代方括号中的空格)


如果你遇到了运行 hexo g hexo s 时报错

If you get error when you are running hexo s hexo g.

如果 ./_config.yml 中包含多语言,則運行$ hexo generate 中將會多次報錯,且無法生成 index.html 等頁面。

Node.js and NPM Information

Node.js 和 NPM 的相关信息

v13.8.0
6.13.7

Package dependencies Information

依赖包相关信息

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.2.0"
  },
  "dependencies": {
    "hexo": "^4.2.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0"
  }
}
{
  "name": "hexo-theme-suka",
  "version": "1.3.3",
  "description": "Modern, powerful and simple theme for Hexo",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "setup": "npm cache clean && npm install",
    "lint": "bash lint.sh"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/SukkaW/hexo-theme-suka.git"
  },
  "keywords": [
    "hexo",
    "hexo-theme",
    "suka",
    "sukkaw"
  ],
  "author": "SukkaW",
  "license": "GPL-3.0",
  "bugs": {
    "url": "https://github.com/SukkaW/hexo-theme-suka/issues"
  },
  "homepage": "https://github.com/SukkaW/hexo-theme-suka#readme",
  "devDependencies": {
    "ejs-lint": "0.3.0",
    "eslint": "6.5.1",
    "gulp": "4.0.2",
    "gulp-autoprefixer": "7.0.1",
    "gulp-clean-css": "4.2.0",
    "gulp-rename": "1.4.0",
    "gulp-uglify": "3.0.2",
    "sass-lint": "1.13.1"
  },
  "dependencies": {
    "node-prismjs": "0.1.2",
    "prismjs": "1.17.1",
    "qr-image": "3.2.0"
  }
}

Hexo version

Hexo 版本号

hexo-cli: 3.1.0
os: Linux 4.15.0-62-generic linux x64
node: 13.8.0
v8: 7.9.317.25-node.28
uv: 1.34.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 79
nghttp2: 1.40.0
napi: 5
llhttp: 2.0.4
openssl: 1.1.1d
cldr: 36.0
icu: 65.1
tz: 2019c
unicode: 12.1

Hexo & Theme Configuration

站点配置文件和主题配置文件

language:
  - zh
  - en

Error Log

报错日志

attrs[i].match is not a function
ERROR Render HTML failed: about/index.html

如果你在浏览器中发现了问题

If you find something wrong when visiy your blog in browser.

Which device am I using, such as Android, iOS, Windows, Linux, MacOS

我使用的平台,如 Android、iOS、Windows、Linux、MacOS 等

Which brows am I using, such as Chrome 58.0.3029.110 (64-bit)

我使用的浏览器(如 Chrome 58.0.3029.110 64 位)

Dev Tool - Console.log

开发者面板的控制台日志

What you are expected and what you actually get

预期结果和你的实际结果


Demo site related with this issue, JSFiddle and gist are welcomed.

和 issue 有关的在线演示页面,推荐使用 JSFiddle 和 gist

Link(s) to source code or any usefull link(s)

相关源码或有用资源的入口