tigefa 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.markdown +91 -0
- data/Gemfile +2 -0
- data/History.markdown +871 -0
- data/LICENSE +15 -14
- data/README.markdown +59 -0
- data/Rakefile +298 -0
- data/bin/tigefa +158 -0
- data/cucumber.yml +3 -0
- data/features/create_sites.feature +141 -0
- data/features/data.feature +65 -0
- data/features/drafts.feature +25 -0
- data/features/embed_filters.feature +60 -0
- data/features/include_tag.feature +57 -0
- data/features/markdown.feature +67 -0
- data/features/pagination.feature +82 -0
- data/features/permalinks.feature +85 -0
- data/features/post_data.feature +214 -0
- data/features/post_excerpts.feature +50 -0
- data/features/site_configuration.feature +235 -0
- data/features/site_data.feature +107 -0
- data/features/step_definitions/tigefa_steps.rb +189 -0
- data/features/support/env.rb +75 -0
- data/lib/site_template/.gitignore +1 -0
- data/lib/site_template/_config.yml +3 -0
- data/lib/site_template/_layouts/default.html +44 -0
- data/lib/site_template/_layouts/post.html +9 -0
- data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +24 -0
- data/lib/site_template/css/main.css +160 -0
- data/lib/site_template/css/syntax.css +60 -0
- data/lib/site_template/index.html +13 -0
- data/lib/tigefa/cleaner.rb +73 -0
- data/lib/tigefa/command.rb +27 -0
- data/lib/tigefa/commands/build.rb +70 -0
- data/lib/tigefa/commands/doctor.rb +67 -0
- data/lib/tigefa/commands/new.rb +67 -0
- data/lib/tigefa/commands/serve.rb +65 -0
- data/lib/tigefa/configuration.rb +238 -0
- data/lib/tigefa/converter.rb +48 -0
- data/lib/tigefa/converters/identity.rb +21 -0
- data/lib/tigefa/converters/markdown/kramdown_parser.rb +29 -0
- data/lib/tigefa/converters/markdown/maruku_parser.rb +56 -0
- data/lib/tigefa/converters/markdown/rdiscount_parser.rb +37 -0
- data/lib/tigefa/converters/markdown/redcarpet_parser.rb +70 -0
- data/lib/tigefa/converters/markdown.rb +43 -0
- data/lib/tigefa/converters/textile.rb +50 -0
- data/lib/tigefa/convertible.rb +174 -0
- data/lib/tigefa/core_ext.rb +90 -0
- data/lib/tigefa/deprecator.rb +36 -0
- data/lib/tigefa/draft.rb +35 -0
- data/lib/tigefa/entry_filter.rb +35 -0
- data/lib/tigefa/errors.rb +4 -0
- data/lib/tigefa/excerpt.rb +113 -0
- data/lib/tigefa/filters.rb +174 -0
- data/lib/tigefa/generator.rb +4 -0
- data/lib/tigefa/generators/pagination.rb +217 -0
- data/lib/tigefa/layout.rb +45 -0
- data/lib/tigefa/mime.types +85 -0
- data/lib/tigefa/page.rb +160 -0
- data/lib/tigefa/plugin.rb +75 -0
- data/lib/tigefa/post.rb +312 -0
- data/lib/tigefa/related_posts.rb +59 -0
- data/lib/tigefa/site.rb +427 -0
- data/lib/tigefa/static_file.rb +70 -0
- data/lib/tigefa/stevenson.rb +89 -0
- data/lib/tigefa/tags/gist.rb +48 -0
- data/lib/tigefa/tags/highlight.rb +85 -0
- data/lib/tigefa/tags/include.rb +134 -0
- data/lib/tigefa/tags/post_url.rb +63 -0
- data/lib/tigefa/url.rb +69 -0
- data/lib/tigefa.rb +98 -4
- data/script/bootstrap +2 -0
- data/site/.gitignore +4 -0
- data/site/CNAME +1 -0
- data/site/README +1 -0
- data/site/_config.yml +6 -0
- data/site/_includes/analytics.html +32 -0
- data/site/_includes/docs_contents.html +16 -0
- data/site/_includes/docs_contents_mobile.html +23 -0
- data/site/_includes/docs_option.html +11 -0
- data/site/_includes/docs_ul.html +20 -0
- data/site/_includes/footer.html +15 -0
- data/site/_includes/header.html +18 -0
- data/site/_includes/news_contents.html +23 -0
- data/site/_includes/news_contents_mobile.html +11 -0
- data/site/_includes/news_item.html +24 -0
- data/site/_includes/primary-nav-items.html +14 -0
- data/site/_includes/section_nav.html +22 -0
- data/site/_includes/top.html +17 -0
- data/site/_layouts/default.html +12 -0
- data/site/_layouts/docs.html +23 -0
- data/site/_layouts/news.html +19 -0
- data/site/_layouts/news_item.html +27 -0
- data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +23 -0
- data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +27 -0
- data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +28 -0
- data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +25 -0
- data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +27 -0
- data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +31 -0
- data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +20 -0
- data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +20 -0
- data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +23 -0
- data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +19 -0
- data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +19 -0
- data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +43 -0
- data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +21 -0
- data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +30 -0
- data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +18 -0
- data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +27 -0
- data/site/css/gridism.css +110 -0
- data/site/css/normalize.css +1 -0
- data/site/css/pygments.css +70 -0
- data/site/css/style.css +946 -0
- data/site/docs/configuration.md +375 -0
- data/site/docs/contributing.md +128 -0
- data/site/docs/datafiles.md +63 -0
- data/site/docs/deployment-methods.md +109 -0
- data/site/docs/drafts.md +21 -0
- data/site/docs/extras.md +56 -0
- data/site/docs/frontmatter.md +180 -0
- data/site/docs/github-pages.md +91 -0
- data/site/docs/heroku.md +9 -0
- data/site/docs/history.md +866 -0
- data/site/docs/index.md +52 -0
- data/site/docs/installation.md +76 -0
- data/site/docs/migrations.md +11 -0
- data/site/docs/pages.md +86 -0
- data/site/docs/pagination.md +211 -0
- data/site/docs/permalinks.md +180 -0
- data/site/docs/plugins.md +534 -0
- data/site/docs/posts.md +181 -0
- data/site/docs/quickstart.md +32 -0
- data/site/docs/resources.md +46 -0
- data/site/docs/sites.md +29 -0
- data/site/docs/structure.md +190 -0
- data/site/docs/templates.md +339 -0
- data/site/docs/troubleshooting.md +150 -0
- data/site/docs/upgrading.md +146 -0
- data/site/docs/usage.md +63 -0
- data/site/docs/variables.md +322 -0
- data/site/favicon.png +0 -0
- data/site/feed.xml +36 -0
- data/site/freenode.txt +1 -0
- data/site/img/article-footer.png +0 -0
- data/site/img/footer-arrow.png +0 -0
- data/site/img/footer-logo.png +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/img/tube.png +0 -0
- data/site/img/tube1x.png +0 -0
- data/site/index.html +90 -0
- data/site/js/modernizr-2.5.3.min.js +4 -0
- data/site/news/index.html +10 -0
- data/site/news/releases/index.html +10 -0
- data/test/fixtures/broken_front_matter1.erb +5 -0
- data/test/fixtures/broken_front_matter2.erb +4 -0
- data/test/fixtures/broken_front_matter3.erb +7 -0
- data/test/fixtures/exploit_front_matter.erb +4 -0
- data/test/fixtures/front_matter.erb +4 -0
- data/test/helper.rb +65 -0
- data/test/source/+/foo.md +7 -0
- data/test/source/.htaccess +8 -0
- data/test/source/_config.dev.toml +2 -0
- data/test/source/_data/languages.yml +2 -0
- data/test/source/_data/members.yaml +7 -0
- data/test/source/_data/products.yml +1 -0
- data/test/source/_includes/params.html +7 -0
- data/test/source/_includes/sig.markdown +3 -0
- data/test/source/_includes/tmp +1 -0
- data/test/source/_layouts/default.html +27 -0
- data/test/source/_layouts/post/simple.html +1 -0
- data/test/source/_layouts/simple.html +1 -0
- data/test/source/_plugins/dummy.rb +8 -0
- data/test/source/_posts/2008-02-02-not-published.textile +8 -0
- data/test/source/_posts/2008-02-02-published.textile +8 -0
- data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
- data/test/source/_posts/2008-11-21-complex.textile +8 -0
- data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
- data/test/source/_posts/2008-12-13-include.markdown +8 -0
- data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
- data/test/source/_posts/2009-01-27-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-category.textile +7 -0
- data/test/source/_posts/2009-01-27-empty-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-empty-category.textile +7 -0
- data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
- data/test/source/_posts/2009-05-18-empty-tag.textile +6 -0
- data/test/source/_posts/2009-05-18-empty-tags.textile +6 -0
- data/test/source/_posts/2009-05-18-tag.textile +6 -0
- data/test/source/_posts/2009-05-18-tags.textile +9 -0
- data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
- data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
- data/test/source/_posts/2010-01-08-triple-dash.markdown +5 -0
- data/test/source/_posts/2010-01-09-date-override.textile +7 -0
- data/test/source/_posts/2010-01-09-time-override.textile +7 -0
- data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
- data/test/source/_posts/2010-01-16-override-data.textile +4 -0
- data/test/source/_posts/2011-04-12-md-extension.md +7 -0
- data/test/source/_posts/2011-04-12-text-extension.text +0 -0
- data/test/source/_posts/2013-01-02-post-excerpt.markdown +14 -0
- data/test/source/_posts/2013-01-12-nil-layout.textile +6 -0
- data/test/source/_posts/2013-01-12-no-layout.textile +5 -0
- data/test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep +0 -0
- data/test/source/_posts/2013-04-11-custom-excerpt.markdown +10 -0
- data/test/source/_posts/2013-05-10-number-category.textile +7 -0
- data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +23 -0
- data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
- data/test/source/_posts/2014-01-06-permalink-traversal.md +5 -0
- data/test/source/_posts/es/2008-11-21-nested.textile +8 -0
- data/test/source/about.html +6 -0
- data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
- data/test/source/contacts/bar.html +5 -0
- data/test/source/contacts/index.html +5 -0
- data/test/source/contacts.html +5 -0
- data/test/source/css/screen.css +76 -0
- data/test/source/deal.with.dots.html +7 -0
- data/test/source/exploit.md +5 -0
- data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
- data/test/source/index.html +22 -0
- data/test/source/products.yml +4 -0
- data/test/source/sitemap.xml +32 -0
- data/test/source/symlink-test/_data +1 -0
- data/test/source/symlink-test/symlinked-dir +1 -0
- data/test/source/symlink-test/symlinked-file +1 -0
- data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
- data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
- data/test/suite.rb +11 -0
- data/test/test_command.rb +39 -0
- data/test/test_configuration.rb +181 -0
- data/test/test_convertible.rb +51 -0
- data/test/test_core_ext.rb +88 -0
- data/test/test_entry_filter.rb +74 -0
- data/test/test_excerpt.rb +78 -0
- data/test/test_filters.rb +113 -0
- data/test/test_generated_site.rb +83 -0
- data/test/test_kramdown.rb +62 -0
- data/test/test_new_command.rb +104 -0
- data/test/test_page.rb +212 -0
- data/test/test_pager.rb +116 -0
- data/test/test_post.rb +592 -0
- data/test/test_rdiscount.rb +22 -0
- data/test/test_redcarpet.rb +61 -0
- data/test/test_redcloth.rb +86 -0
- data/test/test_related_posts.rb +47 -0
- data/test/test_site.rb +333 -0
- data/test/test_tags.rb +490 -0
- data/test/test_url.rb +28 -0
- data/tigefa.gemspec +306 -0
- metadata +575 -45
- data/README.md +0 -4
data/site/docs/drafts.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Working with drafts
|
4
|
+
prev_section: posts
|
5
|
+
next_section: pages
|
6
|
+
permalink: /docs/drafts/
|
7
|
+
---
|
8
|
+
|
9
|
+
Drafts are posts without a date. They're posts you're still working on and don't want to
|
10
|
+
publish yet. To get up and running with drafts, create a `_drafts` folder in your site's
|
11
|
+
root (as described in the [site structure](/docs/structure/) section) and create your
|
12
|
+
first draft:
|
13
|
+
|
14
|
+
{% highlight text %}
|
15
|
+
|-- _drafts/
|
16
|
+
| |-- a-draft-post.md
|
17
|
+
{% endhighlight %}
|
18
|
+
|
19
|
+
To preview your site with drafts, simply run `jekyll serve` or `jekyll build` with
|
20
|
+
the `--drafts` switch. Each will be assigned the value modification time of the draft file
|
21
|
+
for its date, and thus you will see currently edited drafts as the latest posts.
|
data/site/docs/extras.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Extras
|
4
|
+
prev_section: plugins
|
5
|
+
next_section: github-pages
|
6
|
+
permalink: /docs/extras/
|
7
|
+
---
|
8
|
+
|
9
|
+
There are a number of (optional) extra features that Jekyll supports that you
|
10
|
+
may want to install, depending on how you plan to use Jekyll.
|
11
|
+
|
12
|
+
## LaTeX Support
|
13
|
+
|
14
|
+
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
|
15
|
+
(Version 0.6) which must be in your `$PATH` along with `dvips`. If you need
|
16
|
+
Maruku to not assume a fixed location for `dvips`, check out [Remi’s Maruku
|
17
|
+
fork](http://github.com/remi/maruku).
|
18
|
+
|
19
|
+
## RDiscount
|
20
|
+
|
21
|
+
If you prefer to use [RDiscount](http://github.com/rtomayko/rdiscount) instead
|
22
|
+
of [Maruku](http://github.com/bhollis/maruku) for Markdown, just make sure you have
|
23
|
+
it installed:
|
24
|
+
|
25
|
+
{% highlight bash %}
|
26
|
+
$ [sudo] gem install rdiscount
|
27
|
+
{% endhighlight %}
|
28
|
+
|
29
|
+
And then specify RDiscount as the Markdown engine in your `_config.yml` file to
|
30
|
+
have Jekyll run with that option.
|
31
|
+
|
32
|
+
{% highlight yaml %}
|
33
|
+
# In _config.yml
|
34
|
+
markdown: rdiscount
|
35
|
+
{% endhighlight %}
|
36
|
+
|
37
|
+
## Kramdown
|
38
|
+
|
39
|
+
You can also use [Kramdown](http://kramdown.rubyforge.org/) instead of Maruku
|
40
|
+
for Markdown. Make sure that Kramdown is installed:
|
41
|
+
|
42
|
+
{% highlight bash %}
|
43
|
+
$ [sudo] gem install kramdown
|
44
|
+
{% endhighlight %}
|
45
|
+
|
46
|
+
Then you can specify Kramdown as the Markdown engine in `_config.yml`.
|
47
|
+
|
48
|
+
{% highlight yaml %}
|
49
|
+
# In _config.yml
|
50
|
+
markdown: kramdown
|
51
|
+
{% endhighlight %}
|
52
|
+
|
53
|
+
Kramdown has various options for customizing the HTML output. The
|
54
|
+
[Configuration](/docs/configuration/) page lists the default options used by
|
55
|
+
Jekyll. A complete list of options is also available on the [Kramdown
|
56
|
+
website](http://kramdown.rubyforge.org/options.html).
|
@@ -0,0 +1,180 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Front-matter
|
4
|
+
prev_section: configuration
|
5
|
+
next_section: posts
|
6
|
+
permalink: /docs/frontmatter/
|
7
|
+
---
|
8
|
+
|
9
|
+
The front-matter is where Jekyll starts to get really cool. Any file that
|
10
|
+
contains a [YAML](http://yaml.org/) front matter block will be processed by
|
11
|
+
Jekyll as a special file. The front matter must be the first thing in the file
|
12
|
+
and must take the form of valid YAML set between triple-dashed lines. Here is a
|
13
|
+
basic example:
|
14
|
+
|
15
|
+
{% highlight yaml %}
|
16
|
+
---
|
17
|
+
layout: post
|
18
|
+
title: Blogging Like a Hacker
|
19
|
+
---
|
20
|
+
{% endhighlight %}
|
21
|
+
|
22
|
+
Between these triple-dashed lines, you can set predefined variables (see below
|
23
|
+
for a reference) or even create custom ones of your own. These variables will
|
24
|
+
then be available to you to access using Liquid tags both further down in the
|
25
|
+
file and also in any layouts or includes that the page or post in question
|
26
|
+
relies on.
|
27
|
+
|
28
|
+
<div class="note warning">
|
29
|
+
<h5>UTF-8 Character Encoding Warning</h5>
|
30
|
+
<p>
|
31
|
+
If you use UTF-8 encoding, make sure that no <code>BOM</code> header
|
32
|
+
characters exist in your files or very, very bad things will happen to
|
33
|
+
Jekyll. This is especially relevant if you’re running Jekyll on Windows.
|
34
|
+
</p>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="note">
|
38
|
+
<h5>ProTip™: Front Matter Variables Are Optional</h5>
|
39
|
+
<p>
|
40
|
+
If you want to use <a href="../variables/">Liquid tags and variables</a> but
|
41
|
+
don’t need anything in your front-matter, just leave it empty! The set of
|
42
|
+
triple-dashed lines with nothing in between will still get Jekyll to process
|
43
|
+
your file. (This is useful for things like CSS and RSS feeds!)
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
## Predefined Global Variables
|
48
|
+
|
49
|
+
There are a number of predefined global variables that you can set in the
|
50
|
+
front-matter of a page or post.
|
51
|
+
|
52
|
+
<div class="mobile-side-scroller">
|
53
|
+
<table>
|
54
|
+
<thead>
|
55
|
+
<tr>
|
56
|
+
<th>Variable</th>
|
57
|
+
<th>Description</th>
|
58
|
+
</tr>
|
59
|
+
</thead>
|
60
|
+
<tbody>
|
61
|
+
<tr>
|
62
|
+
<td>
|
63
|
+
<p><code>layout</code></p>
|
64
|
+
</td>
|
65
|
+
<td>
|
66
|
+
<p>
|
67
|
+
|
68
|
+
If set, this specifies the layout file to use. Use the layout file
|
69
|
+
name without the file extension. Layout files must be placed in the
|
70
|
+
<code>_layouts</code> directory.
|
71
|
+
|
72
|
+
</p>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<td>
|
77
|
+
<p><code>permalink</code></p>
|
78
|
+
</td>
|
79
|
+
<td>
|
80
|
+
<p>
|
81
|
+
|
82
|
+
If you need your processed blog post URLs to be something other than
|
83
|
+
the default <code>/year/month/day/title.html</code> then you can set
|
84
|
+
this variable and it will be used as the final URL.
|
85
|
+
|
86
|
+
</p>
|
87
|
+
</td>
|
88
|
+
</tr>
|
89
|
+
<tr>
|
90
|
+
<td>
|
91
|
+
<p><code>published</code></p>
|
92
|
+
</td>
|
93
|
+
<td>
|
94
|
+
<p>
|
95
|
+
Set to false if you don’t want a specific post to show up when the
|
96
|
+
site is generated.
|
97
|
+
</p>
|
98
|
+
</td>
|
99
|
+
</tr>
|
100
|
+
<tr>
|
101
|
+
<td>
|
102
|
+
<p style="margin-bottom: 5px;"><code>category</code></p>
|
103
|
+
<p><code>categories</code></p>
|
104
|
+
</td>
|
105
|
+
<td>
|
106
|
+
<p>
|
107
|
+
|
108
|
+
Instead of placing posts inside of folders, you can specify one or
|
109
|
+
more categories that the post belongs to. When the site is generated
|
110
|
+
the post will act as though it had been set with these categories
|
111
|
+
normally. Categories (plural key) can be specified as a <a
|
112
|
+
href="http://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
|
113
|
+
space-separated string.
|
114
|
+
|
115
|
+
</p>
|
116
|
+
</td>
|
117
|
+
</tr>
|
118
|
+
<tr>
|
119
|
+
<td>
|
120
|
+
<p><code>tags</code></p>
|
121
|
+
</td>
|
122
|
+
<td>
|
123
|
+
<p>
|
124
|
+
|
125
|
+
Similar to categories, one or multiple tags can be added to a post.
|
126
|
+
Also like categories, tags can be specified as a YAML list or a space-
|
127
|
+
separated string.
|
128
|
+
|
129
|
+
</p>
|
130
|
+
</td>
|
131
|
+
</tr>
|
132
|
+
</tbody>
|
133
|
+
</table>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
## Custom Variables
|
138
|
+
|
139
|
+
Any variables in the front matter that are not predefined are mixed into the
|
140
|
+
data that is sent to the Liquid templating engine during the conversion. For
|
141
|
+
instance, if you set a title, you can use that in your layout to set the page
|
142
|
+
title:
|
143
|
+
|
144
|
+
{% highlight html %}
|
145
|
+
<!DOCTYPE HTML>
|
146
|
+
<html>
|
147
|
+
<head>
|
148
|
+
<title>{% raw %}{{ page.title }}{% endraw %}</title>
|
149
|
+
</head>
|
150
|
+
<body>
|
151
|
+
...
|
152
|
+
{% endhighlight %}
|
153
|
+
|
154
|
+
## Predefined Variables for Posts
|
155
|
+
|
156
|
+
These are available out-of-the-box to be used in the front-matter for a post.
|
157
|
+
|
158
|
+
<div class="mobile-side-scroller">
|
159
|
+
<table>
|
160
|
+
<thead>
|
161
|
+
<tr>
|
162
|
+
<th>Variable</th>
|
163
|
+
<th>Description</th>
|
164
|
+
</tr>
|
165
|
+
</thead>
|
166
|
+
<tbody>
|
167
|
+
<tr>
|
168
|
+
<td>
|
169
|
+
<p><code>date</code></p>
|
170
|
+
</td>
|
171
|
+
<td>
|
172
|
+
<p>
|
173
|
+
A date here overrides the date from the name of the post. This can be
|
174
|
+
used to ensure correct sorting of posts.
|
175
|
+
</p>
|
176
|
+
</td>
|
177
|
+
</tr>
|
178
|
+
</tbody>
|
179
|
+
</table>
|
180
|
+
</div>
|
@@ -0,0 +1,91 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: GitHub Pages
|
4
|
+
prev_section: extras
|
5
|
+
next_section: deployment-methods
|
6
|
+
permalink: /docs/github-pages/
|
7
|
+
---
|
8
|
+
|
9
|
+
[GitHub Pages](http://pages.github.com) are public web pages for users,
|
10
|
+
organizations, and repositories, that are freely hosted on GitHub's
|
11
|
+
[github.io]() domain or on a custom domain name of your choice. GitHub Pages are
|
12
|
+
powered by Jekyll behind the scenes, so in addition to supporting regular HTML
|
13
|
+
content, they’re also a great way to host your Jekyll-powered website for free.
|
14
|
+
|
15
|
+
## Deploying Jekyll to GitHub Pages
|
16
|
+
|
17
|
+
GitHub Pages work by looking at certain branches of repositories on GitHub.
|
18
|
+
There are two basic types available: user/organization pages and project pages.
|
19
|
+
The way to deploy these two types of sites are nearly identical, except for a
|
20
|
+
few minor details.
|
21
|
+
|
22
|
+
### User and Organization Pages
|
23
|
+
|
24
|
+
User and organization pages live in a special GitHub repository dedicated to
|
25
|
+
only the GitHub Pages files. This repository must be named after the account
|
26
|
+
name. For example, [@mojombo’s user page
|
27
|
+
repository](https://github.com/mojombo/mojombo.github.io) has the name
|
28
|
+
`mojombo.github.io`.
|
29
|
+
|
30
|
+
Content from the `master` branch of your repository will be used to build and
|
31
|
+
publish the GitHub Pages site, so make sure your Jekyll site is stored there.
|
32
|
+
|
33
|
+
<div class="note info">
|
34
|
+
<h5>Custom domains do not affect repository names</h5>
|
35
|
+
<p>
|
36
|
+
GitHub Pages are initially configured to live under the
|
37
|
+
<code>username.github.io</code> subdomain, which is why repositories must
|
38
|
+
be named this way <strong>even if a custom domain is being used</strong>.
|
39
|
+
</p>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
### Project Pages
|
43
|
+
|
44
|
+
Unlike user and organization Pages, Project Pages are kept in the same
|
45
|
+
repository as the project they are for, except that the website content is
|
46
|
+
stored in a specially named `gh-pages` branch. The content of this branch will
|
47
|
+
be rendered using Jekyll, and the output will become available under a subpath
|
48
|
+
of your user pages subdomain, such as `username.github.io/project` (unless a
|
49
|
+
custom domain is specified—see below).
|
50
|
+
|
51
|
+
The Jekyll project repository itself is a perfect example of this branch
|
52
|
+
structure—the [master branch]({{ site.repository }}) contains the
|
53
|
+
actual software project for Jekyll, however the Jekyll website (that you’re
|
54
|
+
looking at right now) is contained in the [gh-pages
|
55
|
+
branch]({{ site.repository }}/tree/gh-pages) of the same repository.
|
56
|
+
|
57
|
+
### Project Page URL Structure
|
58
|
+
|
59
|
+
Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
|
60
|
+
branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
|
61
|
+
Project Pages complicates the proper resolution of URLs. Here is an approach to
|
62
|
+
utilizing the GitHub Project Page URL structure (`username.github.io/project-name/`)
|
63
|
+
whilst maintaining the ability to preview your Jekyll site locally.
|
64
|
+
|
65
|
+
1. In `_config.yml`, set the `baseurl` option to `/project-name` -- note the
|
66
|
+
leading slash and the **absence** of a trailing slash.
|
67
|
+
2. When referencing JS or CSS files, do it like this:
|
68
|
+
`{% raw %}{{ site.baseurl}}/path/to/css.css{% endraw %}` -- note the slash
|
69
|
+
immediately following the variable (just before "path").
|
70
|
+
3. When doing permalinks or internal links, do it like this:
|
71
|
+
`{% raw %}{{ site.baseurl }}{{ post.url }}{% endraw %}` -- note that there
|
72
|
+
is **no** slash between the two variables.
|
73
|
+
4. Finally, if you'd like to preview your site before committing/deploying using
|
74
|
+
`jekyll serve`, be sure to pass an **empty string** to the `--baseurl` option,
|
75
|
+
so that you can view everything at `localhost:4000` normally (without
|
76
|
+
`/project-name` at the beginning): `jekyll serve --baseurl ''`
|
77
|
+
|
78
|
+
This way you can preview your site locally from the site root on localhost,
|
79
|
+
but when GitHub generates your pages from the gh-pages branch all the URLs
|
80
|
+
will start with `/project-name` and resolve properly.
|
81
|
+
|
82
|
+
<div class="note">
|
83
|
+
<h5>GitHub Pages Documentation, Help, and Support</h5>
|
84
|
+
<p>
|
85
|
+
For more information about what you can do with GitHub Pages, as well as for
|
86
|
+
troubleshooting guides, you should check out <a
|
87
|
+
href="https://help.github.com/categories/20/articles">GitHub’s Pages Help
|
88
|
+
section</a>. If all else fails, you should contact <a
|
89
|
+
href="https://github.com/contact">GitHub Support</a>.
|
90
|
+
</p>
|
91
|
+
</div>
|