Blog updates, for one thing, do require constant writing, and I sold the computer I used to use to publish my blog. Said many are tears….) “And I quit my job, so I don’t have any new books. Later, I found a new job and began to work in succession. I have been reminding myself that my blog can not stop. After all, it took a lot of energy to build it. I must insist on it
Well, how to continue to update the blog when changing the computer, to ensure that the previous configuration of articles and so on unchanged, online search for a long time, found that the following method can be executed, convenient and reliable.
-
Reinstall Git on a new computer and download it from the official website
-
Reinstall Node.js
Windows 32-bit installation package download address
Windows 64-bit installation package download address
-
To install hexo, go to your desktop, right click, and type git bash here
npm install -g hexo
-
Next, copy the original files to the new computer (I have backed up all the files in the blog folder to the usb drive before selling the previous computer, as shown in the picture below). The steps are as follows:
- As before, I have created a myBlog folder on drive E of this new computer and have added the _config. yML, Themes, source, scaffolds, package.json, Copy.gitignore to the myblog folder on the new computer
- Right-click myBlog folder on E disk –>
git bash here
, typenpm install
Command to install the module
Note that we didn’t use hexo init to initialize the site, because some of the files were already copied and generated, so we don’t need to use hexo init to initialize the site. If we use hexo init at this point, the site configuration file _config.yml will be empty using the default values. Remember to remember
-
Go to myblog root and type the following command to deploy to Git using the hexo d command
npm install hexo-deployer-git --save Copy the code
-
Ok, test it, now create a new article, edit it and then hit Hexo G-d to see if it was successfully deployed!
Personal blog: http://hogenlaw.com