搭建我的 github + octopress 博客

使用 Github+Octopress 搭建博客

1.对git不陌生

2.创建github页面。注意:

Github Pages for users and organizations uses the master branch like the public directory on a web server, serving up the files at your Pages url http://username.github.io. As a result, you’ll want to work on the source for your blog in the source branch and commit the generated content to the master branch. Octopress has a configuration task that helps you set all this up.

比如我的github用户名是taoliuh,那么创建一个github page 一定要设置仓库名称为taoliuh.github.io

3.绑定独立域名

我在godaddy上注册的域名。在域名管理页面添加ANAME: @204.232.175.78 CNAME: http your-custom-domain

4.发表博客

rake new_post["Hello World: The First of Many New Blog Posts"]

5.预览

rake preview

6.发布

当完成写作时,你需要生成并发布到github.

rake generate
rake deploy

不要忘了提交改动的文件到source分支

git add . 
git commit -am 'Add my first blog post' 
git push origin source

现在你就能在这个页面user-name.github.io看到你的博客文章了~LOL

设置github page

Custom Domain With Octopress and Github Pages

你好!github页面

为Octopress修改主题和自定义样式

定制Octopress

象写程序一样写博客:搭建基于github的博客