Overview
Git
- Download git, after that use bash to operate.
- Set the configuration (I will show how to set the configuration on my another blog)
- Create a new file to store your blog.
- Then open git bash at this file.
- Then we need to set SSH key
SSH key
- Enter this command
ssh-keygen -t rsa -C "Your mail address"
. - Then you will see Git ask you to "Enter file in which to save the key", just press Enter.
- Then you will be asked to Enter a code, it is linux style, which means that you can't see the code you type.
- When you see this, it means your ssh key is successfully set.
- Find
.ssh\id_rsa.pub
(its path is showed in the introduction after you successfully set the ssh key) - Use Nodepad++ (because of stupid microsoft) to open this file and copy its contents.
- Open your Github, click your picture, then click settings, and click
- SSH and GPG keys, choose New sskey
- Test this by
ssh -T git@github.com
- Then use these two commands
git config --global user.name "your id"
git config --global user.email "your email bond with your github"
Install Node.js
I will show how to install this on another blog.
Hexo
- Open gitbash at the place where you are going to set your blog.
- Enter
npm install hexo-cli -g
- Then enter
hexo -v
to test whether Hexo is successfully installed. - Enter
npm install hexo --save
- To confirm the current document file is empty.
- Run the command
hexo init
- You can see this in your document file
Begin to build up your blog
- connect Hexo and your gitbub
Then use gitbash >
hexo g
>hexo s
>npm install hexo-deployer-git --save
>hexo d
Then you can see your blog by this site
https://yourid.github.io