hexo搭建博客,配置_config.yml遇到的error

lifesimple
  • 816

SF参考学习博客

配置_config.yml参考博客

我是参考上面博客学习的,问题在
我用sublime打开_config.yml 编辑了title subtile之类的信息保存后,在git下输入hexo server(或其他指令),报错,如下。

$ hexo server [error] { name: 'HexoError', reason: 'can not read a block mapping entry; a multiline key may not be an imp licit key', mark: { name: null, buffer: '# Hexo Configuration\n## Docs: http://hexo.io/docs/configuration.h tml\n## Source: https://github.com/hexojs/hexo/\n\n# Site\ntitle: Hello world\ns ubtitle:Jing\'s blog\ndescription:\nauthor: "Jing Wang"\nemail:[email protected] l.com\nlanguage:zh-CN \n\n# URL\n## If your site is put in a subdirectory, set u rl as \'http://yoursite.com/child\' and root as \'/child/\'\nurl: http://yoursit e.com\nroot: /\npermalink: :year/:month/:day/:title/\ntag_dir: tags\narchive_dir
archives\ncategory_dir: categories\ncode_dir: downloads/code\npermalink_defaul
ts:\n\n# Directory\nsource_dir: source\npublic_dir: public\n\n# Writing\nnew_pos
t_name: :title.md # File name of new posts\ndefault_layout: post\ntitlecase: fal
se # Transform title into titlecase\nexternal_link: true # Open external links i
n new tab\nfilename_case: 0\nrender_drafts: false\npost_asset_folder: false\nrel
ative_link: false\nhighlight:\n enable: true\n line_number: true\n tab_replac
e:\n\n# Category & Tag\ndefault_category: uncategorized\ncategory_map:\ntag_map:
\n\n# Archives\n## 2: Enable pagination\n## 1: Disable pagination\n## 0: Fully D
isable\narchive: 2\ncategory: 2\ntag: 2\n\n# Server\n## Hexo uses Connect as a s
erver\n## You can customize the logger format as defined in\n## http://www.sench
alabs.org/connect/logger.html\nport: 4000\nserver_ip: localhost\nlogger: false\n
logger_format: dev\n\n# Date / Time format\n## Hexo uses Moment.js to parse and
display date\n## You can customize the date format as defined in\n## http://mome
ntjs.com/docs/#/displaying/format/\ndate_format: MMM D YYYY\ntime_format: H:mm:s
s\n\n# Pagination\n## Set per_page to 0 to disable pagination\nper_page: 10\npag
ination_dir: page\n\n# Disqus\ndisqus_shortname:\n\n# Extensions\n## Plugins: ht
tps://github.com/hexojs/hexo/wiki/Plugins\n## Themes: https://github.com/hexojs/
hexo/wiki/Themes\ntheme: landscape\nexclude_generator:\n\n# Deployment\n## Docs:
http://hexo.io/docs/deployment.html\ndeploy:\n type:\n\u0000',
position: 171,
line: 7,
column: 11 },
message: 'Config file load failed',
domain:
{ domain: null,
_events: { error: [Function] },
_maxListeners: 10,
members: [ [Object] ] },
domainThrown: true,
stack: undefined }

google没有很好的google到?

这是什么问题,难道是我配置的时候错了?因为之前我没去配置 是好好的.

我的配置文件

Site

title: Jing's blog
subtitle: welcome
description:nice to meet you
author: Jing
email:[email protected]
language:zh-CN

....(其他的都没动过)

回复
阅读 30.5k
2 个回答

额 我可能找到问题了,检查_config.yml内容,特别注意:后面需要有一个空格。
参考自:Hexo常见问题解决方案

我只能说 这真是没想到,以后得注意了...

宣传栏