preparation

Install Node.js and git, and then operate both in Git

$node -v $NPM -vCopy the code

Download node from nodejs.org/en/

Node Chinese document nodejs.cn/api/

Git-scm.com/

Git Chinese documentation git-scm.com/book/zh/v2

$NPM I NRM -g $NRM ls $NRM use TaobaoCopy the code

Install hexo

$hexo $NPM install -g hexo-cli $hexo -vCopy the code

Create a blog

Create a blog folder /blog

Right-click Git Bash Here in the /blog folder to open the Git console

Initialize the blog

$ hexo init
Copy the code

Create a blog

$ hexo s
Copy the code

Opening hexo in the browser returns the address localhost:4000

Hexo upload code cloud Gitee

Register for a Gitee account

gitee.com/

Binding a public key

Let the hidden folder appear first

Open the gitbash console in the C:\Users\ username \.ssh folder and use the command

$ ssh-keygen -t rsa
Copy the code

Press enter repeatedly until you see the next line of input

A new file is generated in the. SSH folder. Use Notepad to open the id_rsa.pub file in the file, copy the content in the file and paste it into the gitee public key text box

Create the Gitee repository

Follow gitee’s instructions, the only thing that needs to be noted is that the repository name is the same as the path of the domain name (i.e., the registered user name)

Modifying a Configuration File

Find the _config.yml file in the blog folder and open it using the IDE

Modify the Language item:

language: zh-CN
Copy the code

Modify the deploy item:

Repo is SSH for the repository

Git blog

For details about how to use Git, please refer to the official Git documentation provided above

Start the GiteePages service

Note: This service requires application to open

Find the entry in the service, click on the update after entering, the system will send your blog address, use this address to access