使用Hexo打造自己的个人博客
0 条评论Now we can use hexo,github and your domain to make a site like here.
You must prepare something:
- hexo
- github account
- your domain
Use Hexo
Install node
hexo used node so we must install node before all,I use homebrew in Mac:1brew install nodeCreate blog folder and install hexo :
123mkdir blogcd blognpm install hexo-cli -gTest hexo :
1hexo server
then you can visit http://localhost:4000 to see your hexo blog
all config info in _config.yml
Use github domain mapping your blog
now we will use usename.github.io domain mapping your blog
- create your io repository
create it and the repository name must be user_name.github.io,user_name is your github user name
like me https://github.com/BestBurning so my user name is BestBurning and my io domain repo is BestBurning.github.io - mapping your local blog
change _config.yml1vi _config.yml
at the bottom,you can find deploy,make it like
save and exec command
then you can visit your io domain like bestburning.github.io
Mapping your own domain to github.io domain
diyishuai.cn is my domain , and if you visit it will redirect to bestburning.github.io
- Use your domain analyze to your user_name.github.io
- add CNAME with www to point user_name.github.io
- add A with @ to point io domian ip
- at blog/soruce folder ,touch file named CNAME1vi blog/CNAME
add your domain to it
deploy it
- then you can visit diyishuai.cn to visit your blog
hexo have some themes you can select it ,good luck!