个人博客好像是圈子里的标配,你有他有我没有怎么行呢?
用独立博客?累觉不爱!
GitHub早就为我们操碎心了,GitHub Pages提供300M 的免费空间,有便宜不占王八蛋。
下面是我用GitHub-Pages+Hexo搭建博客的步骤

准备

  • username.github.io 仓库
  • Nodejs(With npm,grunt,bower)

开始

1
cd <hexo>
npm install hexo-cli -g
hexo init
npm install

主题

Themes 下有很多好看的主题,tranquilpeak 符合我得口味

Run

1
cd ./themes
git clone https://github.com/LouisBarranqueiro/hexo-theme-tranquilpeak.git tranquilpeak
cd tranquilpeak
npm install
bower install
grunt buildProd

edit _config.yml

1
theme: tranquilpeak

看看 theme/tranquilpeak/docs,下面的使用和开发文档,发现这个主题功能很强大,有事情干了。
编辑 theme/tranquilpeak/_config.yml,评论、统计、搜索想要的东西都配上

1
cd <hexo>
hexo new page "all-categories"
hexo new page "all-tags"
hexo new page "all-archives"
hexo new page "search"

Run hexo server, 打开 http://0.0.0.0:4000/ 看疗效

67D34535-3BDA-48E2-8AEF-770A73511598.png