hexo tutorial (a) - Use hexo + github to build personal blog

Use hexo + github to build personal blog

Installation node.js

Install git environment

Since before the process of doing the project and node.js git is already installed, so the demo is no longer here, you can refer to other online tutorials

Installation hexo

Presumably it was here, you have already installed the node.js and git, let's start the installation hexo.

  • Create a folder in a disk
    I chose the G disk, folder named Blog

  • Enter the Blog folder, right-mouse button -> select Git Bash Here
    kC0Epn.png

  • Input npm install -g hexo-cli, after the wait period, as shown in FIG.
    kC0jN4.png

  • Input npm install hexo -save, after the wait period, as shown in FIG.
    kC0v4J.png

  • We found that, Blog folder much content as shown belowkC0zC9.png

In the next step, I made Command Not Foundthe case to find a solution on the Internet, so with the next steps

  • In the Blog folder, create a new folder, named hexokCB9jx.png
  • Close the current Git Bash, enter hexo folder, right-mouse button -> select Git Bash Here. Or directly input in the current Git Bashcd hexokCBngI.png
  • Input hexo initafter the initialization hexo environment, wait a period of time, as shown in FIG.kCBiDK.png
  • Input npm install, npm install dependencies, the wait period, as shown in FIG.kCBV4H.png
  • Input hexo generateor hexo ggenerate static pages, after the wait period, as shown in FIG.kCBQDf.png
  • Input hexo serveror hexo sgenerate a local service, as shown below. Every time we finished the blog, you can now preview the local and then posted online to go.kCBm8A.png
  • Next, we visited in the browser http://localhost:4000/, as shown in FIG. This is the locally generated a blog.kCBMKP.png
  • Press Ctrl + C in Git Bash, turn off the current port services.
  • Here, our local blog has been set up is complete. The next blog will describe how to connect with Github, the blog uploaded to the Internet

Guess you like

Origin www.cnblogs.com/xrblog/p/11585885.html