Build Hexo Blog

Source: Internet
Author: User

Install Git

Download Msysgit and execute to complete the installation.

Install node. js

Installing node. js in a Windows environment is easy, just download the installation files and execute them to complete the installation.

Installing Hexo

Install with the NPM command. (Right click anywhere, choose Git bash)

Install -G Hexo

after the installation is complete, under your favorite folder (e.g. E:\hexo ), execute the following command (in H:\hexo Right-click inside the mouse button, select Git Bash ), Hexo automatically creates all the files needed for the site in the destination folder. Create a Hexo folder

Hexo Init
Install dependent packages
Install
Local view

Now that we have built a local Hexo blog, execute the following command ( E:\hexo ), and then go to browser input to localhost:4000 see.

Hexo Generatehexo Server

So far, the local blog has been built up.

Below, we're going to deploy to GitHub.

Register here for GitHub

Create repository

In the bottom right corner of your GitHub home page, create a new repository. For example, my GitHub account is zhangs1990, so the repository name I should create should be zhangs1990.github.io(必须与账号同名) .

Deployment

Edit _config.yml ( H:\hexo under). When you deploy, replace the following with zhangs1990 your account name.

Deploy:  type:github  Repository:https://github.com/zippera/ Zhangs1990.github.io.git  Branch:master

Execute the following instructions to complete the deployment.

Hexo Generatehexo Deploy

about 10 minutes of waiting in the browser to access zhangs1990.github.io you can see it!

Tips

Hexo now supports simpler command formats, such as:

hexo g==hexo generate

hexo d==hexo deploy

hexo s==hexo server

hexo n==hexo new

Build Hexo Blog

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.