Use Hexo to build blogs under Ubuntu

Source: Internet
Author: User
Tags install node

1. Install node. js
 
   
  
  1. sudo add-apt-repository ppa:chris-lea/node.js
  2. sudo apt-get update
  3. sudo apt-get install nodejs
2. Install git
 
   
  
  1. sudo apt-get install git
3. Installing Hexo
 
   
  
  1. sudo npm install hexo -g

Start your blog's root directory (or CD to the specified directory, then execute HEXO init)

 
   
  
  1. 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)

 
   
  
  1. 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)

  
 
  1. # Deployment
  2. ## Docs: http://hexo.io/docs/deployment.html
  3. deploy:
  4. type: git
  5. repo: [email protected].com:ClaymanTwinkle/ClaymanTwinkle.github.io.git
  6. branch: master
5.hexo Common Commands
  
 
  1. 创建页面:hexo new post "文章名字(可以是中文)"
  2. 生成html : hexo generate(或者hexo g)
  3. 发布到git: hexo deploy
  4. 生成并发布:hexo generate -d (或者hexo g -d)


From for notes (Wiz)

Use Hexo to build blogs under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.