I just download install Hexo version 3.0.0-rc.2
Now I've setup the deploy section in the _config.yml:
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: github
repo: https://github.com/scaljeri/website.git
branch: gh-pages
message: hexo deploy
However, when I run the deploy command I get the following:
% hexo deploy
ERROR Deployer not found: github
According to the documentation it should work this way. Any suggestions ?
So, should the github deployer be downloaded manually ?
In version 3, your should use git instead of github.
And your need to run
npm install hexo-deployer-git --save
So that you can use hexo-deployer-git as usual.
Thanks for helping. I noticed that hexo doesn't have a deploy option anymore. Also on the hexo-deployer-git repo itself is not much information on how to run the command now. Any help would be appreciated
you can modify your _config.yml
I did as you said:
deploy:
type: git
repo: https://github.com/scaljeri/website.git
branch: gh-pages
message: hexo deploy
But now what. If I look at the options of hexo
% hexo --help
Usage: hexo <command>
Commands:
help Get help on a command.
init Create a new Hexo folder.
migrate Migrate your site from other system to Hexo.
render Render files with renderer plugins.
version Display version information.
Global Options:
--config Specify config file instead of using _config.yml
--debug Display all verbose messages in the terminal
--draft Display draft posts
--safe Disable all plugins and scripts
--silent Hide output on console
I don't see the deploy options ?
your work is done.
all the thing about depoly is set in _config.yml
Ok, thnx. I'll wait until hexo CLI supports it again!
Why you need this option?
So it does the deployment. It should push it to my github repo. Before I did it like this
hexo deploy -m "Commit message"
OK, I get your problom finally.
your problem is the floder is not a hexo floder.
pleasw read https://github.com/hexojs/hexo/wiki/Migrating-from-2.x-to-3.0#modify-packagejson
I'm sorry for my mistake, it is for rc.3.
in rc.2 , the quickist way is to create a new floder, and run hexo init, and copy your source file in it.
I've updated hexo to 3.0.0-rc.3 and followed these instructions: https://github.com/hexojs/hexo/wiki/Migrating-from-2.x-to-3.0#modify-packagejson
Now I have the following issue
% hexo server
[error] TypeError: Cannot read property 'config' of undefined
TypeError: Cannot read property 'config' of undefined
at module.exports (/Users/me/dev/website/node_modules/hexo-server/lib/server.js:13:20)
....
you need to run all of them
npm install hexo-generator-index --save
npm install hexo-generator-archive --save
npm install hexo-generator-category --save
npm install hexo-generator-tag --save
npm install hexo-server --save
npm install hexo-deployer-git --save
npm install [email protected] --save
npm install [email protected] --save
npm install hexo-generator-feed@1 --save
npm install hexo-generator-sitemap@1 --save
I did all of these (and I did it again :) Anyway, I get the same error message again. I tried to create a new project
$> hexo init blog
[error] Error: Theme phase does not exist.
Error: Theme phase does not exist.
....
How do you add themes to hexo itself, because so far i only added themes to the project itself ?
UPDATE: I get the same error when I install hexo with npm install hexo
you should run
npm install hexo -g
instead of
npm install hexo
And try hexo init instead of hexo init blog
I did use the -g options, but I still get the same error
% hexo init
[error] Error: Theme phase does not exist.
Error: Theme phase does not exist.
change theme to landscape.
While searching for landscape I noticed I had a _config.yml in my homedir :(
Now everything seems to work fine until I fire-up the browser. In the browser I see the following:
<%- partial('_partial/head') %>
<%- partial('_partial/header', null, {cache: !config.relative_link}) %>
<%- body %>
<% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> <% } %>
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
<%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> <%- partial('_partial/after-footer') %>
Should I install more packages ?
run npm install hexo-renderer-ejs --save maybe.
That did the trick!! Now it works in the browser and if I deploy it to github it looks fine too: http://scaljeri.github.io/website/
Thanks a lot!
Thanks god. =。=
type: github to type: git
I have faced the same problem ,what should I do to solve it.
The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d
That's not simple . Hope author change it.
Hi guys, I got a problem here after I update hexo. I move all my posts away, the test.md is a new post I just created. It seems something wrong with node_modules? :
[error] 13:23:33.684 HexoError: Process failed: _posts/test.md
TypeError: Cannot read property 'config' of null
at module.exports (/home/caffrey/blog/node_modules/hexo-renderer-marked/lib/renderer.js:55:10)
at /usr/local/lib/node_modules/hexo/lib/extend/renderer.js:78:38
at b (domain.js:183:18)
at Domain.run (domain.js:123:23)
at store.(anonymous function) (/usr/local/lib/node_modules/hexo/lib/extend/renderer.js:77:9)
at /usr/local/lib/node_modules/hexo/lib/core/render.js:96:9
at fn (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:641:34)
at Object._onImmediate (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:557:34)
at processImmediate as _immediateCallback
The error is from "hexo g" command...
Thank you, Xuanwo :)
After using git instead of github, it works well !!
@UnnamedSong Very happy that I can help you~
thanks everyone , i get my help from here!
The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d
That's all right!
The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d
That's all right!
@iqiangcheng thanks
按照一下操作 确实解决了:
执行完以后,如果报错 Error: Deployer not found : github,则执行如下命令:
npm install hexo-deployer-git --save
同时修改 _config.yml :
deploy:
type: git //改成github
然后再执行:
hexo generate
hexo deploy
I have installed the hexo-deployer-git ,but the error still exist.
ERROR Deployer not found: git
Are you sure your command is npm install hexo-deployer-git --save instead of npm install hexo-deployer-git?
And are you sure you install this in your hexo dictory?
Success!
I installed the hexo-deployer-git through the command ,but not the hexo dictory(hexo init dir).
Thank you very much!@Xuanwo
@illusionworld thx
The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d
it works
报错
$ npm install hexo-deployer-git --save
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
how to solve this err?
$ npm install hexo-generator-feed --saved
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
[email protected] E:hexo
└── [email protected]
well,when i was generating the sitemap ,i update the hexo/_config.yml by adding plugins:- hexo-generator-sitemap in the last of the file and the error araising later.
As soon as i deleted what i have added the error away.
you should change
type: github to type: git with _config.yml
The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d
That's all right!
这个插件得安装
$ npm install hexo-deployer-git --save
然后操作如下
_config.yml 配置如下:
deploy:
type: git
repo: [email protected]:youname/yourname.github.io.git
branch: master
message:
我就是这样配置才解决这个问题的(ERROR Deployer not found: github),这是官网文档的部署配置
Most helpful comment
In version 3, your should use
gitinstead ofgithub.And your need to run
So that you can use hexo-deployer-git as usual.