github-pages
6期 2012年1月30日

github-pages

你是否早已厌倦了常见博客软件的单调模板?是否因为简单的更新和备份而浪费很多时间?跟愚蠢和低效说再见吧,象一个真正的Unix黑客一样重新开始我们的博客人生。

Resources:

terminal
mkdir lovelypeter.github.com
cd lovelypeter.github.com
git init
touch README
git add README
git remote add origin git@github.com:lovelypeter/loverlypeter.github.com.git
echo "hi I am index.html">index.html
git add .
git ci
git push -u origin master
_config.yml
markdown: maruku
pygments: true
happypeter 大约一年前

just don't have _layouts/ named _layout/, otherwise your layout files are all ignored and you don't know what's going on since there is no error msg

happypeter 大约一年前

just don't have layouts/ named layout, otherwise your layout files are all ignored and you don't know what's going on since there is no error msg

happypeter 9 个月前

If your github username is Foo, the a repo named foo.github.com won't make it as your blog repo name. You have to make it Foo.github.com.

williamherry 8 个月前

1,2,3 :-)

happypeter 8 个月前

...4...

lufeihaidao 7 个月前

git push -u origin master
老是提示输入用户名和密码,怎么让bash记住呢?

happypeter 7 个月前

@lufeihaidao 这是个常见问题,估计你是用 https 打头的 url 做的 clone。解决方法是打开 .git/config 把里面的 origin的 url 改成 ssh 的,类似这样:

url = git@github.com:happycasts/episodes.git
lufeihaidao 7 个月前

嗯确实这样,谢谢

Jacky 7 个月前

果然是神器啊,我说怎么很多github上面的项目都有自己的个性主页。学习了。

happypeter 6 个月前

github pages 的常见问题之一就是发现自己新推送上去的东西不能在 html 页面上显示,其实原因很简单,就是我们的内容里有 jekyll 不能接受的格式错误。

要找到这些错误可以在我们本地机器安装 jekyll,然后进行调试。

gem install jekyll
poemcao 6 个月前

jekyll有点小敏感,没有本地预览的娃儿只有把所有除了文字以外所有可能导致错误的符号全部删除,哈哈,谢谢