built a personal blog with hexo

demo


Welcome to Hexo!
This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

install nodejs

download nodejs from here to enable nodejs package manager

install hexo

1
npm install -g hexo

Create a new blog

1
$ hexo init myBlog

More info: Writing

Create a new post

1
$ hexo new "My-New-Post"

More info: Writing

Generate static files from markdown files

1
$ hexo generate

More info: Generating

Run server

1
$ hexo server

More info: Server

view the effect

you can see the pages on

http://localhost:4000

register on github

you should have a account on github before you go to the next step

https://github.com/

Create a repository

you had to create a repository named ‘your_account.github.io’
more info: repository

install the git

you can download git from here and install it globally .
the path should be added into the path environment variable

1
2
$ git --version
git version 2.7.2.windows.1

install hexo-depoyer-git

1
npm install hexo-deployer-git --save

configure

edit _config.yml file on hexo root directory

1
2
3
4
deploy:
type: github
repository: https://github.com/xiaomiya/xiaomiya.github.com.git
branch: master

Deploy to github

1
$ hexo deploy

More info: Deployment

backup

1
npm install hexo-git-backup
1
2
3
4
5
6
7
# backup
## docs: https://github.com/coneycode/hexo-git-backup
backup:
type: git
repository:
github: https://github.com/xxx/hexo-blog-xxx.git,master
gitcafe: https://github.com/xxx/hexo-blog-xxx.git,master
1
hexo backup

More info: backup

the end

it is time to have a deep breath ! a personal blog is ready on github !
you can view hexo.io to more informations , plugins and awsome themes …

example
demo

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. install nodejs
  2. 2. install hexo
  3. 3. Create a new blog
  4. 4. Create a new post
  5. 5. Generate static files from markdown files
  6. 6. Run server
  7. 7. view the effect
  8. 8. register on github
  9. 9. Create a repository
  10. 10. install the git
  11. 11. install hexo-depoyer-git
  12. 12. configure
  13. 13. Deploy to github
  14. 14. backup
  15. 15. the end
,