Using Jekyll with Pages——使用Jekyll框架

In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog-aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers some other advanced templating features.

为了支持HTML内容,GitHub Pages支持了Jekyll框架,Jekyll是一个简单的博客类静态网站生成器。Jekyll能够简单地在各个页面中使用全局的headers和footers。同时Jekyll也能提供一些其他的模版特性。

Using Jekyll——使用Jekyll

Every GitHub Page is run through Jekyll when you push content to a specially named branch within your repository. For User Pages, use the master branch in your repository. For Project Pages, use the gh-pages branch in your project’s repository. Because a normal HTML site is also a valid Jekyll site, you don’t have to do anything special to keep your standard HTML files unchanged. Jekyll has thorough documentation that covers its features and usage. Simply start committing Jekyll formatted files and you’ll be using Jekyll in no time.

当你向一个特殊命名的远程仓库推送内容后,GitHub Page就能够通过Jekyll来运行。对于用户页面,可以在名为username.github.io的仓库中设置master分支。对于项目页面,在项目仓库中设置gh-pages分支。因为一个普通的HTML网页也是一个Jekyll框架网页,所以你无需对你的标准HTML文件做任何改动。Jekyll有专门描述其特性和使用方法的文档。你可以轻轻松松使用Jekyll框架来实现你的网站。

Installing Jekyll——安装Jekyll

We highly recommend installing Jekyll on your computer to preview your site and help diagnose troubled builds before publishing your site on GitHub Pages.

Luckily, installing Jekyll on your computer, and ensuring your computer most closely matches the GitHub Pages settings is easy, thanks to the GitHub Pages Gem and our dependency versions page. To install Jekyll, you’ll need a few things:

我们强烈推荐你在你的电脑上安装Jekyll来预览你的网站,同时这也能帮助你在GitHub Pages上发布网站之前,诊断因为部署失败而引发的错误。非常幸运地,在电脑上安装Jekyll和相关设置非常的简单易懂。安装Jekyll的步骤如下:

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now