1. Install node. js
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
2. Install git
sudo apt-get install git
3. Installing Hexo
sudo npm install hexo -g
Start your blog's root directory (or CD to the specified directory, then execute HEXO init)
hexo init <dir>
4. Let blogs be published to Git(Reference connection: https://hexo.io/docs/deployment.html)
(1) Install Hexo-deployer-git (otherwise error deployer not found:git)
npm install hexo-deployer-git --save
(2) Configure your Hexo blog root directory under the _config.yml file (should be the bottom line, modified to your GitHub)
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git
repo: [email protected].com:ClaymanTwinkle/ClaymanTwinkle.github.io.git
branch: master
5.hexo Common Commands
创建页面:hexo new post "文章名字(可以是中文)"
生成html : hexo generate(或者hexo g)
发布到git: hexo deploy
生成并发布:hexo generate -d (或者hexo g -d)
From for notes (Wiz)
Use Hexo to build blogs under Ubuntu