[Hexo] use to build personal blog hexo

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/u010996565/article/details/89194995

hexo build personal blog tutorial

What is 1.hexo

Hexo efficient static site generation framework, based on her Node.js. By Hexo you can easily use Markdown to write the article, in addition to the Markdown syntax itself, can also be used to provide content Hexo label plug-in to quickly insert specific form, but also in relation to other frameworks, Hexo in speed is also a great advantage .

2. Install node.js

We understand Hexo Node.js, then we first need to build a blog site installation based on Node.js environment. Node.js is a JavaScript runtime environment Chrome V8 engine, you can be in a non-browser environment, explain to run JS code.

Download: http://nodejs.cn/download

Test the installation: the command line using the node -v, npm -v, view displays the version number that is success.

Here Insert Picture Description

Now we need to replace the mirror npm

npm get registry
npm config set registry http://registry.npm.taobao.org/

3. Install Hexo

Hexo station is a tool that can help us to quickly generate basic blog file, install it needs to use the following command in the console:

npm install hexo-cli -g

After the installation is complete, you can check the version

hexo –v

Appears to explain the installation of FIG.
Here Insert Picture Description

4. New Site

Create a new site
hexo init myblog
After the completion of the new cd myblog enter the directory install dependencies

Here Insert Picture Description

npm install

Here Insert Picture Description

After all rely fully installed you can compile the code, start the service
hexo g

Here Insert Picture Description

hexo s

Start Service

1554849425493

Address bar: HTTP: // localhost: 4000 you can see the effect

Here Insert Picture Description

5. Deploy site on github

First install git, installed classmates skip

git official website: https://git-scm.com/download
Here Insert Picture Description

Can be selected according to their own system download

After the installation is complete, this option appears in the desktop right-click on the installation was successful
Here Insert Picture Description

Create a log in to your github repository
Here Insert Picture Description

The ssh address copied hexo profile
Here Insert Picture Description
Here Insert Picture Description

Set up SSH keys

Set your email address

ssh-keygen -t rsa -C "yourmail"

Then in C: \ there under Users \ Administrator path .ssh file folder open you can see just generated secret key information
Here Insert Picture Description
Here Insert Picture Description

Click to add ssh key is done add the ssh key

Finally, to detect what

ssh -T [email protected]

Here Insert Picture Description

The following can be deployed

Generate static pages
hexo generate 或者 hexo g
deploy
hexo deploy 或者 hexo d

Then enter our github address https://chenylz.github.io you can see the effect it

Guess you like

Origin blog.csdn.net/u010996565/article/details/89194995