关于安装 hexo 结束后,敲命令 hexo server 出现错误怎么解决?

2014-12-14 14:29:53 +08:00
 echopan
下面输入的信息是我的
出现的错误如下:
[error] { name: 'HexoError',
reason: 'can not read a block mapping entry; a multiline key may not be an implicit key',
mark:
{ name: null,
buffer: '# Hexo Configuration\n## Docs: http://hexo.io/docs/configuration.html\n## Source: https://github.com/hexojs/hexo/\n\n# Site\ntitle: hexo\nsubtitle:angel beats!\ndescription:\nauthor: echopan\nemail:xxxxx@hotmail.com\nlanguage:zh-CN\n# URL\n## If your site is put in a subdirectory, set url as \'http://hexo.freedom.moe/\' and root as \'home/hexo.freedom.moe/\n\'\nurl: http://hexo.freedom.moe\nroot: /home/hexo.freedom.moe/\npermalink: :year/:month/:day/:title/\ntag_dir: tags\narchive_dir: archives\ncategory_dir: categories\ncode_dir: downloads/code\npermalink_defaults:\n\n# Directory\nsource_dir: source\npublic_dir: public\n\n# Writing\nnew_post_name: :title.md # File name of new posts\ndefault_layout: post\ntitlecase: false # Transform title into titlecase\nexternal_link: true # Open external links in new tab\nfilename_case: 0\nrender_drafts: false\npost_asset_folder: false\nrelative_link: false\nhighlight:\n enable: true\n line_number: true\n tab_replace:\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 Disable\narchive: 2\ncategory: 2\ntag: 2\n\n# Server\n## Hexo uses Connect as a server\n## You can customize the logger format as defined in\n## http://www.senchalabs.org/connect/logger.html\nport: 4000\nserver_ip: localhost\nlogger: false\nlogger_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://momentjs.com/docs/#/displaying/format/\ndate_format: MMM D YYYY\ntime_format: H:mm:ss\n\n# Pagination\n## Set per_page to 0 to disable pagination\nper_page: 10\npagination_dir: page\n\n# Disqus\ndisqus_shortname:\n\n# Extensions\n## Plugins: https://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: 165,
line: 7,
column: 11 },
message: 'Config file load failed',
domain:
{ domain: null,
_events: { error: [Function] },
_maxListeners: 10,
members: [ [Object] ] },
domainThrown: true,
stack: undefined }
这怎么解决?
少了什么细节?
6626 次点击
所在节点    Node.js
1 条回复
abuuu
2014-12-18 13:58:06 +08:00
看起来是你的yml文件格式问题,你自己检查一下是不是 冒号后面没有写空格?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/153835

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX