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
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
Set up an account and mailbox
Modify the configuration information blog site
Open the blog site folder, find _config.yml
, use the editor to open the
find deploy, configure the following information
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
at this time in your computer will generate a .ssh file
to open the file inside the id_rsa.pub, copied to github to complete key match
open github
, click setting
click New SSH key
the keys of id_rsa.pub copy to inside
the git bash here, returns "You've successfully authenticated" That success:
Hexo to deploy on GitHub
hexo clean #清除缓存
hexo g #生成文章
hexo d #部署文章
You may have to enter username and password when hexo d
deployment is successful, enter on the website http: // own name .github.io to GitHub