neoFelhz / hexo-theme-spectre

A modern, simple & elegant theme for Hexo
https://blog.nfz.moe
GNU General Public License v3.0
103 stars 9 forks source link

hexo g 报语法错误 #3

Open hosxy opened 6 years ago

hosxy commented 6 years ago

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

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


I'm submitting a (check one with "x")

我正在申请 (选择时请使用 "x" 取代方括号中的空格)


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

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

Node.js and NPM Information

Node.js 和 NPM 的相关信息

node --version
v10.6.0

npm --version
6.1.0

Package dependencies Information

依赖包相关信息

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
   "version": ""
 },
  "dependencies": {
   "hexo": "^3.2.0",
   "hexo-generator-archive": "^0.1.4",
   "hexo-generator-category": "^0.1.3",
   "hexo-generator-index": "^0.2.0",
   "hexo-generator-tag": "^0.2.0",
   "hexo-renderer-ejs": "^0.3.0",
   "hexo-renderer-stylus": "^0.3.1",
   "hexo-renderer-marked": "^0.3.0",
   "hexo-server": "^0.2.0"
  }
 }

Hexo version

Hexo 版本号

 hexo --version
 hexo: 3.7.1
 hexo-cli: 1.1.0
 os: Linux 4.4.0-112-generic linux x64
 http_parser: 2.8.0
 node: 10.6.0
 v8: 6.7.288.46-node.13
 uv: 1.21.0
 zlib: 1.2.11
 ares: 1.14.0
 modules: 64
 nghttp2: 1.32.0
 napi: 3
 openssl: 1.1.0h
 icu: 61.1
 unicode: 10.0
 cldr: 33.0
 tz: 2018c

Hexo & Theme Configuration

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

# Site
title: hosxy
subtitle:
description:
keywords:
author: hosxy
language: zh-CN
timezone:

Error Log

报错日志

INFO  Start processing
ERROR Process failed: layout/_partial/index/author_info.ejs
SyntaxError: Unexpected token =            in /home/travis/build/hosxy/hosxy.github.io/themes/spectre/layout/_partial/index/author_info.ejs while   compiling ejs
If the above error is not helpful, you may want to try EJS-Lint:

https://github.com/RyanZim/EJS-Lint Or, if you meant to create an async function, pass async: true as an option.
at new Function (<anonymous>)
at Template.compile (/home/travis/build/hosxy/hosxy.github.io/node_modules/ejs/lib/ejs.js:618:12)

at Object.compile (/home/travis/build/hosxy/hosxy.github.io/node_modules/ejs/lib/ejs.js:389:16)

at Function.ejsRenderer.compile (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo-renderer-ejs/lib/renderer.js:11:14)

at Theme._View.View.View._precompile (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo/lib/theme/view.js:117:31)

at Theme._View.View.View (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo/lib/theme/view.js:13:8)

at new Theme._View.View (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo/lib/theme/index.js:37:10)

at Theme.setView (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo/lib/theme/index.js:71:20)

at file.read.then.result (/home/travis/build/hosxy/hosxy.github.io/node_modules/hexo/lib/theme/processors/view.js:14:14)

at tryCatcher (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/util.js:16:23)

at Promise._settlePromiseFromHandler (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:512:31)

at Promise._settlePromise (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:569:18)

at Promise._settlePromise0 (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:614:10)

at Promise._settlePromises (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:693:18)

at Promise._fulfill (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:638:18)

at Promise._resolveCallback (/home/travis/build/hosxy/hosxy.github.io/node_modules/bluebird/js/release/promise.js:432:57)

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

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

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

我使用的平台,如 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)

和 issue 有关的在线演示页面

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

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

rickyxume commented 6 years ago

我也遇到了这个问题。按照楼上的操作还是不行啊。,。

liwuxi commented 6 years ago

作者说有时间就重构,我的解决方案是直接copy作者blog里的主题文件。

SuperNG6 commented 5 years ago

确实是,在最新版的hexo里已经没有办法运行了,这个主题真的很好看,停止维护真是太可惜了