At the first stop, we learned about the general steps of building a blog, starting from downloading and installing Git and Node.js, until configuring personal information on Git.
Today I will start to explain from downloading Git and Node.js, so that Xiaobai can understand any blog construction, and teach you step by step to the other side of success!
We need to configure the environment first and check whether Git and Node.js are successfully installed (you can install it yourself on Baidu)
Download Hexo
When downloading Hexo, we need to create a new folder and name it Blog (named blog for the editor test). Then right-click under this folder to find Git Bash Here and open it, and execute the following commands step by step:
$ npm install hexo-cli -g
$ npm install hexo-deployer-git --save
The running conditions are as follows (the running may be slower):
To: It is recommended that you use English Blog when creating a new folder, otherwise the above garbled may appear. ``
After running, new files will appear in this folder, as follows:
Then we need to create a new folder in the Blog file and name it Hexo . Right-click in this file to find Git Bash Here and open it.
The file path is as follows:
Enter the following command in Git:
hexo init
The results are as follows (the operation will be a bit slow):
After the download is complete, the following files will appear in the file:
Local view effect
Execute the following commands step by step to view the effect through http://localhost:4000:
hexo generate
hexo server
The results are as follows:
We finally saw http://localhost:4000 appear and succeeded.
Then we can enter the above URL in the browser to see the effect:
at this step, congratulations on your local deployment has been completed.
The next step is to deploy to Github and configure SSH keys and personal information. After completion, we will have our own website, and we can record our life records at any time.