Hexo: process failed with `date:` in post's metadata

Created on 6 Jul 2015  ·  23Comments  ·  Source: hexojs/hexo

如果在post的meta里放date字段,hexo g 的时候就会报错process failed。比如:

title: test
date: 2015-07-06 14:41:34
tags:

---

testtest

hexo 版本:

$ hexo --version
hexo: 3.1.1
os: Darwin 14.1.0 darwin x64
http_parser: 2.3
node: 0.12.2
v8: 3.28.73
uv: 1.4.2-node1
zlib: 1.2.8
modules: 14
openssl: 1.0.1m

请教如何解决?

Most helpful comment

唉唉是我的问题,根本原因是timezone那里写错了,应该是Asia/Shanghai,改正确就好了。

但是写错误的timezone,landscape主题也可以用,难道landscape里忽略了这个选项?

多谢 @Xuanwo 耽误你一下午时间。

All 23 comments

你把tags字段删掉试试= =,问题可能出在tags后面没有空格

去掉tags仍然是process failed,我用debug看不到有用的信息,有什么其他的调试办法么

你把日期的前导零去掉试试?
2015-7-6 14:41:34, 而不是2015-07-06 14:41:34

nope,仍然不管用(待我晚上有空去扒代码看好了

sad, 我本地测试是没有问题的= =

该不会是- -,你的---之前多了个空格?。。

@Xuanwo 没有哇,issue里这个可能是从终端里复制出来时的问题,实际没有

我觉得你完全重装下hexo吧= =,我本地没法重现你这个BUG

然后重装并没有用,我在debian里再尝试一下

debian里也是process failed.

@Xuanwo 能把你的测试文章内容发一下我看看吗?

另外我的nodejs版本v0.12.2

我直接复制的你的- -,你把你的config.ym贴出来看看呢

如下:

# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: test
subtitle: test。
description: The world around you is not what it seems.
author: wych42
language: zh-cn
timezone: CN

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://blog.test.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace: true

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: http://hexo.io/plugins/
## Themes: http://hexo.io/themes/
theme: jacman

# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
  type:

啊 我把err打印出来是这个TypeError: Cannot read property 'offset' of null

你把jacman换成landscape试试呢

唉唉是我的问题,根本原因是timezone那里写错了,应该是Asia/Shanghai,改正确就好了。

但是写错误的timezone,landscape主题也可以用,难道landscape里忽略了这个选项?

多谢 @Xuanwo 耽误你一下午时间。

可能jacman直接在什么地方调用了timezone,但是lanscape并没有把

@wych42 其实也没什么,互帮互助嘛= =,当初别人也是这么帮我的~,传递下去就可以

还是多谢 @Xuanwo ,那我关闭这个issue了。

恩,好~

+1 采用的默认的时区UTC+8 不行,改掉就好了!

@MarloweW 完美解决问题。timezone写错+1

谢谢,我的也是当初把timezone写错了。解决了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pod4g picture pod4g  ·  24Comments

SukkaW picture SukkaW  ·  25Comments

wadmes picture wadmes  ·  21Comments

ghost picture ghost  ·  27Comments

curbengh picture curbengh  ·  24Comments