Create new repository
You'll need to create a repository named <strong>username.github.io</strong>.
The <strong>username</strong> must be your github name.
So as my repository sbzhu.github.io
Clone your new repository to local disk
git clone git@github.com:/sbzhu/sbzhu.github.io
Then a director named .git is about here.
Get other's jekyll template
You can get jekyll template from website like jekyll themes or just simply clone one from others github like this:
-
clone template jekyll to local
git clone https://github.com/sbzhu/huxpro.github.io.git
Then you'll get a director named huxpro.github.io.git
-
Run this jekyll on localhost
cd huxpro.github.io.git jekyll build jekyll serve
-
browse it with site : http://localhost:4000
Add template jekyll project to your repository
cp -r huxpro.github.io.git/!(.git) sbzhu.github.io/
Push this repository to github
git add -A
git commit -m 'initial version'
git push origin master
Enjoy you Github pages
Visit the website www.sbzhu.github.io
网友评论