From 0 to build a personal blog website (II)

EDITORIAL

How to write a blog on a blog site will be deployed locally, mainly to write this article on how to deploy the blog to the remote site, which is Github or Gitee. Author is currently doing graduate design, just to complete the deployment and modification work style, then will take the time to write a blog and optimize access speed. Blog site: https://trace001.gitee.io/

Deploying Personal blog on Github

Install Git plugin

In their new blog folder, right-click-click git bash here, enter the terminal:
cnpm install --save hexo-deployer-git
From 0 to build a personal blog website (II)

Registered and logged in Github

Github as a programmer acquire the Holy Land to learn the code, I believe everyone has the right account. If not rush to sign up for a recommendation.

Creating a warehouse on Github

Create a warehouse, called: your GitHub account .github.io eg: (tracese.github.io), this step is very important, to be in accordance with the requirements, or else will be behind some inexplicable errors
From 0 to build a personal blog website (II)
From 0 to build a personal blog website (II)

Set up an account and mailbox

From 0 to build a personal blog website (II)

Modify the configuration information blog site

Open the blog site folder, find _config.yml, use the editor to open the
From 0 to build a personal blog website (II)
find deploy, configure the following information
From 0 to build a personal blog website (II)
which the repo is just created GitHub repository
yml file is a file depending on the space, such as life, so yml profile writing specifications: key: value and intermediate space is required, or will be error

Creating SSH

ssh-keygen -t rsa -C "自己的邮箱"
No password, you can have a carriage return
From 0 to build a personal blog website (II)
at this time in your computer will generate a .ssh file
From 0 to build a personal blog website (II)
to open the file inside the id_rsa.pub, copied to github to complete key match
From 0 to build a personal blog website (II)
open github, click setting
From 0 to build a personal blog website (II)
click New SSH key
From 0 to build a personal blog website (II)
the keys of id_rsa.pub copy to inside
From 0 to build a personal blog website (II)
the git bash here, returns "You've successfully authenticated" That success:
From 0 to build a personal blog website (II)

Hexo to deploy on GitHub

        hexo clean              #清除缓存
        hexo g                      #生成文章
        hexo d                      #部署文章

From 0 to build a personal blog website (II)
You may have to enter username and password when hexo d
From 0 to build a personal blog website (II)
From 0 to build a personal blog website (II)From 0 to build a personal blog website (II)
deployment is successful, enter on the website http: // own name .github.io to GitHub
From 0 to build a personal blog website (II)

Guess you like

Origin blog.51cto.com/13646338/2485820