On April 1st, when I was browsing in the app named coolapk,I inadvertently read a trend about free access to Alibaba cloud server for six months. I opened the official activity website about Alibaba cloud and verified it is true. At that time I thought: why not get one ESC Cloud Server to play with? But the day’s quota was gone. The next morning I managed to get my quota and start to learn how to use it to build a blog.
Through the Internet search, I refer to the technical articles of other netizen, step by step build my blog on the cloud server by Wordpress Platform. On the same time, found a free way , which is that deploy blog on github or coding. Now, I’d like to talk the way about deploying hexo blog on github.
Login your Github Account and create a repository named
"your user name" .github.io ,finally your blog address is
http://"your user name".github.io .
Open the Git Bash program, implement
npm install -g hexo to install hexo, when finished, create a folder on your computer disk, for example I create a folder named hexo on D Drive, and then in Git Bash implement
cd /d/hexo to make position in the D Drive’s hexo folder. Next, implement
hexo init and would generate your blog building files in hexo folder.
ssh-keygen -t rsa -C "your github account's email address" # will generate Provite Key and Public Key on computer's user directory C:\Users\accountName\.ssh
.ssh\id_rsa.pub and use TXT Editor open id_rsa.pub and copy the contents , open your github’s home page, enter Personal Setting -> SSH and GPG keys -> New SSH key and paste on.
ssh -T firstname.lastname@example.org
Are you sure you want to continue connecting (yes/no)? then enter
yes and press Enter Key, if prompt
Hi XXX! You've successfully authenticated, but GitHub does not provide shell access. means your setup succesful.
At this point you also need to configure:
git config --global user.name "xxx"// your github's account name，not the nickname
then open the
_config.yml file in the hexo main directory and modify it:
npm install hexo-deployer-git --save #install deployer command
hexo g to generate website files, implement
hexo s then you can through
http://localhost:4000/ to preview your blog!
After your custome setting then implement
hexo d will deploy your blog on github.