hexo

hexo deploy to github pages fail


I want to deploy hexo to github page:https://chenjuexu.github.io/

But it did not work like below:

$ hexo generate FATAL YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key (107:18)

104 | deploy: 105 | type: git 106 | repo:https://github.com/chenjuexu/chenjuexu.gi ... 107 | branch:gh-pages

at generateError (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:183:10)
at throwError (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:187:9)
at readBlockMapping (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1145:9)
at composeNode (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1441:12)
at readBlockMapping (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1164:11)
at composeNode (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1441:12)
at readDocument (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1625:3)
at loadDocuments (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1688:5)
at Object.load (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\js-yaml\lib\loader.js:1714:19)
at Hexo.yamlHelper (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\hexo\lib\plugins\renderer\yaml.js:7:15)
at Hexo.tryCatcher (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\util.js:16:23)
at Hexo.<anonymous> (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\method.js:15:34)
at C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\hexo\lib\hexo\render.js:75:22
at tryCatcher (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\promise.js:547:31)       
at Promise._settlePromise (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Walter\Desktop\Hexo blogger\blog\node_modules\bluebird\js\release\async.js:15:14) {

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: https://hexo.io/docs/configuration.html\n' + '## Source: https://github.com/hexojs/hexo/\n' + '\n' + '# Site\n' + 'title: Zen Planet\n' + 'subtitle: ""\n' + 'description: ""\n' + 'keywords:\n' + 'author: Juexu Chen\n' + 'language: en\n' + 'timezone: "America/Toronto"\n' + '\n' + '# URL\n' + "## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'\n" + 'url: http://example.com\n' + 'permalink: :year/:month/:day/:title/\n' + 'permalink_defaults:\n' + 'pretty_urls:\n' + " trailing_index: true # Set to false to remove trailing 'index.html' from permalinks\n" + " trailing_html: true # Set to false to remove trailing '.html' from permalinks\n" + '\n' + '# Directory\n' + 'source_dir: source\n' + 'public_dir: public\n' + 'tag_dir: tags\n' + 'archive_dir: archives\n' + 'category_dir: categories\n' + 'code_dir: downloads/code\n' + 'i18n_dir: :lang\n' + 'skip_render:\n' + '\n' + '# Writing\n' + 'new_post_name: :title.md # File name of new posts\n' + 'default_layout: post\n' + 'titlecase: false # Transform title into titlecase\n' + 'external_link:\n' + ' enable: true # Open external links in new tab\n' + ' field: site # Apply to the whole site\n' + ' exclude: ""\n' + 'filename_case: 0\n' + 'render_drafts: false\n' + 'post_asset_folder: false\n' + 'relative_link: false\n' + 'future: true\n' + 'highlight:\n' + ' enable: true\n' + ' line_number: true\n' + ' auto_detect: false\n' + ' tab_replace: ""\n' + ' wrap: true\n' + ' hljs: false\n' + 'prismjs:\n' + ' enable: false\n' + ' preprocess: true\n' + ' line_number: true\n' + ' tab_replace: ""\n' + '\n' + '# Home page setting\n' + "# path: Root path for your blogs index page. (default = '')\n" + '# per_page: Posts displayed per page. (0 = disable pagination)\n' + '# order_by: Posts order. (Order by date descending by default)\n' + 'index_generator:\n' + ' path: ""\n' + ' per_page: 10\n' + ' order_by: -date\n' + '\n' + '# Category & Tag\n' + 'default_category: uncategorized\n' + 'category_map:\n' + 'tag_map:\n' + '\n' + '# Metadata elements\n' + '## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta\n' + 'meta_generator: true\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/\n' + 'date_format: YYYY-MM-DD\n' + 'time_format: HH:mm:ss\n' + "## updated_option supports 'mtime', 'date', 'empty'\n" + 'updated_option: "mtime"\n' + '\n' + '# Pagination\n' + '## Set per_page to 0 to disable pagination\n' + 'per_page: 10\n' + 'pagination_dir: page\n' + '\n' + '# Include / Exclude file(s)\n' + "## include:/exclude: options only apply to the 'source/' folder\n" + 'include:\n' + 'exclude:\n' + 'ignore:\n' + '\n' + '# Extensions\n' + '## Plugins: https://hexo.io/plugins/\n' + '## Themes: https://hexo.io/themes/\n' + 'theme: landscape\n' + '\n' + '# Deployment\n' + '## Docs: https://hexo.io/docs/one-command-deployment\n' + 'deploy:\n' + ' type: git\n' + ' repo:https://github.com/chenjuexu/chenjuexu.github.io.git\n' + ' branch:gh-pages\n', position: 2542, line: 106, column: 17, snippet: ' 104 | deploy:\n' + ' 105 | type: git\n' + ' 106 | repo:https://github.com/chenjuexu/chenjuexu.gi ...\n' + ' 107 | branch:gh-pages\n' + '------------------------^' } }

package.json:

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "5.4.0"
  },
  "dependencies": {
    "hexo": "^5.0.0",
    "hexo-deployer-git": "^3.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^4.0.0",
    "hexo-renderer-stylus": "^2.0.0",
    "hexo-server": "^2.0.0",
    "hexo-theme-landscape": "^0.0.3"
  }
}

_config.yml:

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

# Site
title: Zen Planet
subtitle: ""
description: ""
keywords:
author: Juexu Chen
language: en
timezone: "America/Toronto"

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://example.com
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# 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:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ""
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace: ""
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ""

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ""
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# 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
## updated_option supports 'mtime', 'date', 'empty'
updated_option: "mtime"

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

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: landscape

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo:https://github.com/chenjuexu/chenjuexu.github.io.git
  branch:gh-pages

Solution

  • Just cancel it because its version updated