Tools used to
1.git
2.nodejs
3.hexo
4.gitee
By default you have installed Git and NodeJS (not self-Baidu, install a lot of tutorial)
Why Gitee instead GitHub
At present, access to GitHub slow, it can also be wall, so Gitee to build personal blog. Gitee similar domestic version of GitHub, access speed is guaranteed.
Began to build
1. Install Hexo
打开cmd,输入命令
npm install -g hexo-cli
2. Initialize Hexo
Created on your computer Hexo
folder, right-Hexo file folder selection Git Bash Here
Then enter the command
hexo init
After initialization is complete Hexo
directory structure:
3. _config.yml Perform basic configurations on the blog
_config.yml file modification, save
4. Local preview blog
Compile the project, enter the command:hexo g
Run the project, enter the command:hexo s
Enter in your browser http: // localhost: 4000 / can see the effect it is not that simple
If you're just browsing locally, Congratulations, you have completed
Deploy blog to Gitee
1. Create an account Gitee
To cloud code: https://gitee.com/ apply for registration on the account, the domestic version of the code is similar to cloud GitHub, so the user interface with almost GitHub, a few more things domestically, presented here do not do more, their own research under.
2. Create a project
Once created, copy the address of the project in the project.
3. Git disposed in the _config.yml
deploy: type: git repo: https://gitee.com/sinee/sinee.git branch: master
Note: there must be a space after the colon, or can not correctly identify.
4. Publish to Gitee
Enter the command to install the automatic deployment of publishing tools
npm install hexo-deployer-git --save
Enter the following command in turn publish blog, the first release to enter the account number and password in the shell.
hexo clean
hexo g
hexo d
5. Gitee Pages provided
Select the Pages option in the project services
Select the master branch, click deployment / update
Wait a minute blog on the release of successful friends, you can preview it online blog! ! !
If the blog's style is wrong, you need to configure in _config.yml next blog address and path, then the command
hexo clean && hexo g && hexo d
can be friends
The following is my own to build a website, welcome to visit: a sine
What we have encountered any problems during deployment, the public can search for numbers "a sine" and concern, add my micro-channel number at the bottom of the public, will be the first time after seeing the reply