Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教解决方法 #1263

Closed
tongxindao opened this issue May 9, 2015 · 16 comments
Closed

请教解决方法 #1263

tongxindao opened this issue May 9, 2015 · 16 comments

Comments

@tongxindao
Copy link

# hexo d -g                         
You should configure deployment settings in _config.yml first!

Available deployer plugins:
  git

For more help, you can check the online docs: http://hexo.io/


# hexo g
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: Cannot read property 'enable' of null
    at Promise.then.then.then.cache.length (/home/node_modules/hexo/lib/hexo/post.js:301:26)
    at tryCatcher (/home/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/home/node_modules/hexo/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/home/node_modules/hexo/node_modules/bluebird/js/main/promise.js:530:18)
    at Async._drainQueue (/home/node_modules/hexo/node_modules/bluebird/js/main/async.js:182:12)
    at Async._drainQueues (/home/node_modules/hexo/node_modules/bluebird/js/main/async.js:187:10)
    at Async.drainQueues (/home/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
    at process._tickCallback (node.js:415:13)
@Xuanwo
Copy link
Contributor

Xuanwo commented May 9, 2015

第一个问题,你需要npm install hexo-deployer-git --save
第二个问题,不是很清楚,你把config.yml内容贴出来看看

@tongxindao
Copy link
Author

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

# Site
title: dreamer's blog
subtitle:  
description:  
author:  tony
language: zh-CN
timezone:

# Header
menu:
  主页: /
  所有文章: /archives
  # 随笔: /tags/随笔

#Feed Atom
feed:
  type: atom
  path: atom.xml
  limit: 20

#sitemap
sitemap:
  path: sitemap.xml

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.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
tab_replace:

# 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: yilia

# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git   
repository: https://github.com/tongxindao/tongxindao.github.io.git
branch: master

@Xuanwo
Copy link
Contributor

Xuanwo commented May 11, 2015

yml格式要求严格,:之后只能有一个空格。

@Xuanwo
Copy link
Contributor

Xuanwo commented May 17, 2015

比如说,你deploy后面的三个参数,应该这样:

deploy:
  type: git   
  repository: https://github.com/tongxindao/tongxindao.github.io.git
  branch: master

变量名之前两个空格,参数值前一个空格,用:分割

@zairl23
Copy link

zairl23 commented May 17, 2015

deploy:
type: git
branch: [master]
repo: https://github.com/tongxindao/tongxindao.github.io.git

@Xuanwo
Copy link
Contributor

Xuanwo commented Jun 6, 2015

@zairl23 你想表达什么?

@maomaoliang
Copy link

兄弟 你解决这个问题了吗?感觉我的config好像没有什么格式问题啊,让迩并没有什么卵用,唉

@Xuanwo
Copy link
Contributor

Xuanwo commented Jun 21, 2015

deploy后面的每一行都要缩进的啊

@leesei
Copy link
Member

leesei commented Jul 16, 2015

Please open new issue if problem persists.

@leesei leesei closed this as completed Jul 16, 2015
@gggchen
Copy link

gggchen commented Aug 9, 2015

谢谢Xuanwo,我是config格式问题,现在问题解决了!

@YangShuting
Copy link

确实是每一个 :的后面需要也只能有一个在半角情况下敲进去的空格

@ghost
Copy link

ghost commented Apr 25, 2017

我猜你没有安装npm install hexo-deployer-git --save

@herosgame
Copy link

herosgame commented Apr 27, 2017

I changed "repo: " to "repository: "then deploy success. the document write
repo: <repository url>
is the doc wrong?

@NoahDragon
Copy link
Member

@herosgame I'm using repo and works well.

@Wynnfan
Copy link

Wynnfan commented Oct 27, 2017

site下的title 和subtitle设置为中文,乱码

@lukeaust
Copy link

比如说,你deploy后面的三个参数,应该这样:

deploy:
  type: git   
  repository: https://github.com/tongxindao/tongxindao.github.io.git
  branch: master

变量名之前两个空格,参数值前一个空格,用:分割

正解

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests