前言
优点
- 广泛的使用者及相关文档
- Octopress 整合了丰富的第三方插件
- 内置支持 Gitub、Twitter、Google Plus One、Pinboard、Delicious、Disqus Comments、Google Analytics、Facebook
- 源码版本信息完全自己通过 github 控制,可定制高度个性化的个人博客
官方文档
相关资源
安装及配置
Git 安装
Ruby 安装,版本号要求大于1.9.3
设置 Octopress
- 从 git 复制 Octopress
1 | git clone git://github.com/imathis/octopress.git octopress |
- 下一步,安装依赖
1 | gem install bundler # 若报权限错误,加 sudo 执行相关命令 |
- 安装 Octopress 默认主题
1 | rake install # 由于默认主题名为“classic” 该命令等效于:rake install['classic‘] |
- 或者安装第三方主题
1 | cd octopress |
- Octopress发布在Github Pages上
1 | rake setup_github_pages # 该命令将进行一系列的 github 相关配置 |
- 将 octopress 目录下所有代码提交到 source 分支
1 | git add . |
- 自定义域名
1 | echo 'your-domain.com' >> source/CNAME |
- 按规范发布文章,新发布文章的默认扩展名是 markdown,你可以在 Rakefile 文件中更改扩展名
1 | rake new_post["title"] # 按规范发布文章,并且为文章自动生成 yaml metadata |
1 | git pull octopress master # Get the latest Octopress |