Personal blog address, stamp my jump, welcome to exchange and study with me, can leave a message in the message area, common progress!

This method is based on (Hexo+Github) and requires only a Github account.

1. Download and install Node. js and NPM.

2. Install git environment, fool-proof installation method, the default installation is ok, after installation, right-click the mouse in any position, as shown in the following figure, it indicates that the installation is successful.

3. Create a github account and create a new repository with the following format: name.github

4. Install Hexo, create a new folder somewhere on your computer (eg: Blog), go to that folder from the command line, and follow these steps to install it

– the installation hexo

npm install hexo -g

– Check whether the installation is successful

hexo -v

– Initializes the folder

hexo init

– Install required components

hexo install

– Experience Hexo

hexo g

– Open the server and officially access the URL to experience hexo, enter localhost:4000 to access

hexo s

If the following figure is displayed, the server is successfully started



If no, port conflict may occur. Run the following command to switch ports

hexo server -p

When the following page appears, it indicates that the basic framework of the blog has been set up successfully

5. Associate Hexo with GitHub, configure name and email (ps: ignore those already configured), and right-click Git Bash in the blog folder to configure Git Bash

git config --global user.name 'your github name'

git config --global user.email 'your github email'

5.1 Enter ssh-keygen -t rsa -c “[email protected]” and press Enter three times to generate a key. The id_rsa and id_rsa.pub files are displayed. C: \ Users \ Administrator. SSH).
5.2 Run eval “$(ssh-agent-s)” to add the key to the Ssh-agent.
5.3 Run ssh-add ~/. SSH /id_rsa to add the generated SSH key to the ssh-agent.
5.4 Log in to GitHub, click Setting in the profile picture drop-down menu, and add SSH

5.5 Create a new SSH Key and enter the name and Key (the Key in the id_rsa.pub file)

6. Locate the _config.yml file in the root folder and modify the configuration according to the following figure



7. Start blogging by typing in the command to create your first blog

hexo new post 'blogName'

In the source/_posts directory, you can see that a hello.md file has been added

8. An extension needs to be installed before the article is generated and deployed: NPM install hexo-deployer-git –save

9. Once installed, it is ready to deploy, using hexo D-G for deployment

After the deployment is successful, visit http:// username.github. IO. Then you can see the generated published article.

OK, using Hexo +GitHub to build a basic personal blog is complete. In the future, [improved version] will be released, with more refined Settings for personal blog and binding of their own domain name.

Personal blog address: Poke me jump, welcome to exchange and learn with me, common progress!