在github创建repository:username.github.io
2
安装Jekyll-Bootstrap:
git clone
https://github.com/plusjade/jekyll-bootstrap.git username.github.io
cd username.github.com
git remote add origin
https://github.com/username/username.github.io.gitgit push origin master
注意:将username替换为你的用户名。
3
这样基本博客就创建好了。
END
在本地运行
1
安装jekyll
gem install jekyll
2
运行:
cd USERNAME.github.io
jekyll serve
3
注意,如果发现类似下列错误:
Dependency Error: Yikes! It looks like you don't have jekyll-sitemap or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-sitemap' If you run into trouble, you can find helpful resources at
http://jekyllrb.com/help/!
请安装bundler:
gem install bundler
然后安装bundle:
bundle install
END
内容更新
1
添加post:
rake post title="Hello World"
2
增加页面(page):
rake page name="pages/about.md"
可以修改pages/about.md内容
3
发布:
$ git add .
$ git commit -m "Add new content"
$ git push origin master
END
安装模板
1
博客外观可以通过模板来改观,你可以下载现成的模板,甚至创建自己的模板。
rake theme:install git="
https://github.com/jekyllbootstrap/theme-the-program.git"