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
@@ -0,0 +1,322 @@
|
|
1
|
+
---
|
2
|
+
layout: docs
|
3
|
+
title: Variables
|
4
|
+
prev_section: pages
|
5
|
+
next_section: datafiles
|
6
|
+
permalink: /docs/variables/
|
7
|
+
---
|
8
|
+
|
9
|
+
Jekyll traverses your site looking for files to process. Any files with [YAML
|
10
|
+
Front Matter](../frontmatter/) are subject to processing. For each of these
|
11
|
+
files, Jekyll makes a variety of data available via the [Liquid templating
|
12
|
+
system](http://wiki.shopify.com/Liquid). The
|
13
|
+
following is a reference of the available data.
|
14
|
+
|
15
|
+
## Global Variables
|
16
|
+
|
17
|
+
<div class="mobile-side-scroller">
|
18
|
+
<table>
|
19
|
+
<thead>
|
20
|
+
<tr>
|
21
|
+
<th>Variable</th>
|
22
|
+
<th>Description</th>
|
23
|
+
</tr>
|
24
|
+
</thead>
|
25
|
+
<tbody>
|
26
|
+
<tr>
|
27
|
+
<td><p><code>site</code></p></td>
|
28
|
+
<td><p>
|
29
|
+
|
30
|
+
Sitewide information + configuration settings from
|
31
|
+
<code>_config.yml</code>. See below for details.
|
32
|
+
|
33
|
+
</p></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td><p><code>page</code></p></td>
|
37
|
+
<td><p>
|
38
|
+
|
39
|
+
Page specific information + the <a href="../frontmatter/">YAML Front
|
40
|
+
Matter</a>. Custom variables set via the YAML front matter will be
|
41
|
+
available here. See below for details.
|
42
|
+
|
43
|
+
</p></td>
|
44
|
+
</tr>
|
45
|
+
<tr>
|
46
|
+
<td><p><code>content</code></p></td>
|
47
|
+
<td><p>
|
48
|
+
|
49
|
+
In layout files, the rendered content of the Post or Page being wrapped.
|
50
|
+
Not defined in Post or Page files.
|
51
|
+
|
52
|
+
</p></td>
|
53
|
+
</tr>
|
54
|
+
<tr>
|
55
|
+
<td><p><code>paginator</code></p></td>
|
56
|
+
<td><p>
|
57
|
+
|
58
|
+
When the <code>paginate</code> configuration option is set, this
|
59
|
+
variable becomes available for use. See <a
|
60
|
+
href="../pagination/">Pagination</a> for details.
|
61
|
+
|
62
|
+
</p></td>
|
63
|
+
</tr>
|
64
|
+
</tbody>
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
## Site Variables
|
69
|
+
|
70
|
+
<div class="mobile-side-scroller">
|
71
|
+
<table>
|
72
|
+
<thead>
|
73
|
+
<tr>
|
74
|
+
<th>Variable</th>
|
75
|
+
<th>Description</th>
|
76
|
+
</tr>
|
77
|
+
</thead>
|
78
|
+
<tbody>
|
79
|
+
<tr>
|
80
|
+
<td><p><code>site.time</code></p></td>
|
81
|
+
<td><p>
|
82
|
+
|
83
|
+
The current time (when you run the <code>jekyll</code> command).
|
84
|
+
|
85
|
+
</p></td>
|
86
|
+
</tr>
|
87
|
+
<tr>
|
88
|
+
<td><p><code>site.pages</code></p></td>
|
89
|
+
<td><p>
|
90
|
+
|
91
|
+
A list of all Pages.
|
92
|
+
|
93
|
+
</p></td>
|
94
|
+
</tr>
|
95
|
+
<tr>
|
96
|
+
<td><p><code>site.posts</code></p></td>
|
97
|
+
<td><p>
|
98
|
+
|
99
|
+
A reverse chronological list of all Posts.
|
100
|
+
|
101
|
+
</p></td>
|
102
|
+
</tr>
|
103
|
+
<tr>
|
104
|
+
<td><p><code>site.related_posts</code></p></td>
|
105
|
+
<td><p>
|
106
|
+
|
107
|
+
If the page being processed is a Post, this contains a list of up to ten
|
108
|
+
related Posts. By default, these are low quality but fast to compute.
|
109
|
+
For high quality but slow to compute results, run the
|
110
|
+
<code>jekyll</code> command with the <code>--lsi</code> (latent semantic
|
111
|
+
indexing) option.
|
112
|
+
|
113
|
+
</p></td>
|
114
|
+
</tr>
|
115
|
+
<tr>
|
116
|
+
<td><p><code>site.categories.CATEGORY</code></p></td>
|
117
|
+
<td><p>
|
118
|
+
|
119
|
+
The list of all Posts in category <code>CATEGORY</code>.
|
120
|
+
|
121
|
+
</p></td>
|
122
|
+
</tr>
|
123
|
+
<tr>
|
124
|
+
<td><p><code>site.tags.TAG</code></p></td>
|
125
|
+
<td><p>
|
126
|
+
|
127
|
+
The list of all Posts with tag <code>TAG</code>.
|
128
|
+
|
129
|
+
</p></td>
|
130
|
+
</tr>
|
131
|
+
<tr>
|
132
|
+
<td><p><code>site.[CONFIGURATION_DATA]</code></p></td>
|
133
|
+
<td><p>
|
134
|
+
|
135
|
+
All the variables set via the command line and your
|
136
|
+
<code>_config.yml</code> are available through the <code>site</code>
|
137
|
+
variable. For example, if you have <code>url: http://mysite.com</code>
|
138
|
+
in your configuration file, then in your Posts and Pages it will be
|
139
|
+
stored in <code>site.url</code>. Jekyll does not parse changes to
|
140
|
+
<code>_config.yml</code> in <code>watch</code> mode, you must restart
|
141
|
+
Jekyll to see changes to variables.
|
142
|
+
|
143
|
+
</p></td>
|
144
|
+
</tr>
|
145
|
+
</tbody>
|
146
|
+
</table>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
## Page Variables
|
150
|
+
|
151
|
+
<div class="mobile-side-scroller">
|
152
|
+
<table>
|
153
|
+
<thead>
|
154
|
+
<tr>
|
155
|
+
<th>Variable</th>
|
156
|
+
<th>Description</th>
|
157
|
+
</tr>
|
158
|
+
</thead>
|
159
|
+
<tbody>
|
160
|
+
<tr>
|
161
|
+
<td><p><code>page.content</code></p></td>
|
162
|
+
<td><p>
|
163
|
+
|
164
|
+
The un-rendered content of the Page.
|
165
|
+
|
166
|
+
</p></td>
|
167
|
+
</tr>
|
168
|
+
<tr>
|
169
|
+
<td><p><code>page.title</code></p></td>
|
170
|
+
<td><p>
|
171
|
+
|
172
|
+
The title of the Page.
|
173
|
+
|
174
|
+
</p></td>
|
175
|
+
</tr>
|
176
|
+
<tr>
|
177
|
+
<td><p><code>page.excerpt</code></p></td>
|
178
|
+
<td><p>
|
179
|
+
|
180
|
+
The un-rendered excerpt of the Page.
|
181
|
+
|
182
|
+
</p></td>
|
183
|
+
</tr>
|
184
|
+
<tr>
|
185
|
+
<td><p><code>page.url</code></p></td>
|
186
|
+
<td><p>
|
187
|
+
|
188
|
+
The URL of the Post without the domain, but
|
189
|
+
with a leading slash, e.g.
|
190
|
+
<code>/2008/12/14/my-post.html</code>
|
191
|
+
|
192
|
+
</p></td>
|
193
|
+
</tr>
|
194
|
+
<tr>
|
195
|
+
<td><p><code>page.date</code></p></td>
|
196
|
+
<td><p>
|
197
|
+
|
198
|
+
The Date assigned to the Post. This can be overridden in a Post’s front
|
199
|
+
matter by specifying a new date/time in the format
|
200
|
+
<code>YYYY-MM-DD HH:MM:SS</code> (assuming UTC), or
|
201
|
+
<code>YYYY-MM-DD HH:MM:SS +/-TTTT</code> (to specify a time zone using
|
202
|
+
an offset from UTC. e.g. <code>2008-12-14 10:30:00 +0900</code>).
|
203
|
+
|
204
|
+
</p></td>
|
205
|
+
</tr>
|
206
|
+
<tr>
|
207
|
+
<td><p><code>page.id</code></p></td>
|
208
|
+
<td><p>
|
209
|
+
|
210
|
+
An identifier unique to the Post (useful in RSS feeds). e.g.
|
211
|
+
<code>/2008/12/14/my-post</code>
|
212
|
+
|
213
|
+
</p></td>
|
214
|
+
</tr>
|
215
|
+
<tr>
|
216
|
+
<td><p><code>page.categories</code></p></td>
|
217
|
+
<td><p>
|
218
|
+
|
219
|
+
The list of categories to which this post belongs. Categories are
|
220
|
+
derived from the directory structure above the <code>_posts</code>
|
221
|
+
directory. For example, a post at
|
222
|
+
<code>/work/code/_posts/2008-12-24-closures.md</code> would have this
|
223
|
+
field set to <code>['work', 'code']</code>. These can also be specified
|
224
|
+
in the <a href="../frontmatter/">YAML Front Matter</a>.
|
225
|
+
|
226
|
+
</p></td>
|
227
|
+
</tr>
|
228
|
+
<tr>
|
229
|
+
<td><p><code>page.tags</code></p></td>
|
230
|
+
<td><p>
|
231
|
+
|
232
|
+
The list of tags to which this post belongs. These can be specified in
|
233
|
+
the <a href="../frontmatter/">YAML Front Matter</a>.
|
234
|
+
|
235
|
+
</p></td>
|
236
|
+
</tr>
|
237
|
+
<tr>
|
238
|
+
<td><p><code>page.path</code></p></td>
|
239
|
+
<td><p>
|
240
|
+
|
241
|
+
The path to the raw post or page. Example usage: Linking back to the
|
242
|
+
page or post’s source on GitHub. This can be overridden in the
|
243
|
+
<a href="../frontmatter/">YAML Front Matter</a>.
|
244
|
+
|
245
|
+
</p></td>
|
246
|
+
</tr>
|
247
|
+
</tbody>
|
248
|
+
</table>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div class="note">
|
252
|
+
<h5>ProTip™: Use custom front-matter</h5>
|
253
|
+
<p>
|
254
|
+
|
255
|
+
Any custom front matter that you specify will be available under
|
256
|
+
<code>page</code>. For example, if you specify <code>custom_css: true</code>
|
257
|
+
in a page’s front matter, that value will be available as
|
258
|
+
<code>page.custom_css</code>.
|
259
|
+
|
260
|
+
</p>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
## Paginator
|
264
|
+
|
265
|
+
<div class="mobile-side-scroller">
|
266
|
+
<table>
|
267
|
+
<thead>
|
268
|
+
<tr>
|
269
|
+
<th>Variable</th>
|
270
|
+
<th>Description</th>
|
271
|
+
</tr>
|
272
|
+
</thead>
|
273
|
+
<tbody>
|
274
|
+
<tr>
|
275
|
+
<td><p><code>paginator.per_page</code></p></td>
|
276
|
+
<td><p>Number of Posts per page.</p></td>
|
277
|
+
</tr>
|
278
|
+
<tr>
|
279
|
+
<td><p><code>paginator.posts</code></p></td>
|
280
|
+
<td><p>Posts available for that page.</p></td>
|
281
|
+
</tr>
|
282
|
+
<tr>
|
283
|
+
<td><p><code>paginator.total_posts</code></p></td>
|
284
|
+
<td><p>Total number of Posts.</p></td>
|
285
|
+
</tr>
|
286
|
+
<tr>
|
287
|
+
<td><p><code>paginator.total_pages</code></p></td>
|
288
|
+
<td><p>Total number of Pages.</p></td>
|
289
|
+
</tr>
|
290
|
+
<tr>
|
291
|
+
<td><p><code>paginator.page</code></p></td>
|
292
|
+
<td><p>The number of the current page.</p></td>
|
293
|
+
</tr>
|
294
|
+
<tr>
|
295
|
+
<td><p><code>paginator.previous_page</code></p></td>
|
296
|
+
<td><p>The number of the previous page.</p></td>
|
297
|
+
</tr>
|
298
|
+
<tr>
|
299
|
+
<td><p><code>paginator.previous_page_path</code></p></td>
|
300
|
+
<td><p>The path to the previous page.</p></td>
|
301
|
+
</tr>
|
302
|
+
<tr>
|
303
|
+
<td><p><code>paginator.next_page</code></p></td>
|
304
|
+
<td><p>The number of the next page.</p></td>
|
305
|
+
</tr>
|
306
|
+
<tr>
|
307
|
+
<td><p><code>paginator.next_page_path</code></p></td>
|
308
|
+
<td><p>The path to the next page.</p></td>
|
309
|
+
</tr>
|
310
|
+
</tbody>
|
311
|
+
</table>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div class="note info">
|
315
|
+
<h5>Paginator variable availability</h5>
|
316
|
+
<p>
|
317
|
+
|
318
|
+
These are only available in index files, however they can be located in a
|
319
|
+
subdirectory, such as <code>/blog/index.html</code>.
|
320
|
+
|
321
|
+
</p>
|
322
|
+
</div>
|
data/site/favicon.png
ADDED
Binary file
|
data/site/feed.xml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: /feed.xml
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="utf-8"?>
|
7
|
+
<rss version="2.0"
|
8
|
+
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
9
|
+
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
10
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
11
|
+
xmlns:atom="http://www.w3.org/2005/Atom"
|
12
|
+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
13
|
+
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
14
|
+
>
|
15
|
+
<channel>
|
16
|
+
<title xml:lang="en">Jekyll • Simple, blog-aware, static sites</title>
|
17
|
+
<atom:link type="application/atom+xml" href="http://jekyllrb.com/feed/" rel="self"/>
|
18
|
+
<link>http://jekyllrb.com</link>
|
19
|
+
<pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
20
|
+
<lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
|
21
|
+
<language>en-US</language>
|
22
|
+
<description>Transform your plain text into static websites and blogs.</description>
|
23
|
+
{% for post in site.posts %}
|
24
|
+
<item>
|
25
|
+
<title>{{ post.title | xml_escape}}</title>
|
26
|
+
<link>http://jekyllrb.com{{ post.url }}</link>
|
27
|
+
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
28
|
+
<dc:creator>{{ post.author }}</dc:creator>
|
29
|
+
{% for tag in post.tags %}<category>{{ tag | xml_escape }}</category>
|
30
|
+
{% endfor %}{% for cat in post.categories %}<category>{{ cat | xml_escape }}</category>
|
31
|
+
{% endfor %}<guid isPermaLink="false">{{ post.id }}</guid>
|
32
|
+
<description><![CDATA[ {{ post.content }} ]]></description>
|
33
|
+
</item>
|
34
|
+
{% endfor %}
|
35
|
+
</channel>
|
36
|
+
</rss>
|
data/site/freenode.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
aS3gAc4g
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/site/img/tube.png
ADDED
Binary file
|
data/site/img/tube1x.png
ADDED
Binary file
|
data/site/index.html
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
title: Jekyll • Simple, blog-aware, static sites
|
4
|
+
overview: true
|
5
|
+
---
|
6
|
+
|
7
|
+
<section class="intro">
|
8
|
+
<div class="grid">
|
9
|
+
<div class="unit whole center-on-mobiles">
|
10
|
+
<p class="first">Transform your plain text into static websites and blogs.</p>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</section>
|
14
|
+
<section class="features">
|
15
|
+
<div class="grid">
|
16
|
+
<div class="unit one-third">
|
17
|
+
<h2>Simple</h2>
|
18
|
+
<p>
|
19
|
+
No more databases, comment moderation, or pesky updates to install—just <em>your content</em>.
|
20
|
+
</p>
|
21
|
+
<a href="/docs/usage/" class="">How Jekyll works →</a>
|
22
|
+
</div>
|
23
|
+
<div class="unit one-third">
|
24
|
+
<h2>Static</h2>
|
25
|
+
<p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://textile.sitemonks.com/">Textile</a>), <a href="http://wiki.shopify.com/Liquid">Liquid</a>, HTML <span class="amp">&</span> CSS go in. Static sites come out ready for deployment.</p>
|
26
|
+
<a href="/docs/templates/" class="">Jekyll template guide →</a>
|
27
|
+
</div>
|
28
|
+
<div class="unit one-third">
|
29
|
+
<h2>Blog-aware</h2>
|
30
|
+
<p>
|
31
|
+
Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.
|
32
|
+
</p>
|
33
|
+
<a href="/docs/migrations/" class="">Migrate your blog →</a>
|
34
|
+
</div>
|
35
|
+
<div class="clear"></div>
|
36
|
+
</div>
|
37
|
+
</section>
|
38
|
+
<section class="quickstart">
|
39
|
+
<div class="grid">
|
40
|
+
<div class="unit golden-small center-on-mobiles">
|
41
|
+
<h4>Get up and running <em>in seconds</em>.</h4>
|
42
|
+
</div>
|
43
|
+
<div class="unit golden-large code">
|
44
|
+
<p class="title">Quick-start Instructions</p>
|
45
|
+
<div class="shell">
|
46
|
+
<p class="line">
|
47
|
+
<span class="path">~</span>
|
48
|
+
<span class="prompt">$</span>
|
49
|
+
<span class="command">gem install jekyll</span>
|
50
|
+
</p>
|
51
|
+
<p class="line">
|
52
|
+
<span class="path">~</span>
|
53
|
+
<span class="prompt">$</span>
|
54
|
+
<span class="command">jekyll new my-awesome-site</span>
|
55
|
+
</p>
|
56
|
+
<p class="line">
|
57
|
+
<span class="path">~</span>
|
58
|
+
<span class="prompt">$</span>
|
59
|
+
<span class="command">cd my-awesome-site</span>
|
60
|
+
</p>
|
61
|
+
<p class="line">
|
62
|
+
<span class="path">~/my-awesome-site</span>
|
63
|
+
<span class="prompt">$</span>
|
64
|
+
<span class="command">jekyll serve</span>
|
65
|
+
</p>
|
66
|
+
<p class="line">
|
67
|
+
<span class="output"># => Now browse to http://localhost:4000</span>
|
68
|
+
</p>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
</section>
|
74
|
+
<section class="free-hosting">
|
75
|
+
<div class="grid">
|
76
|
+
<div class="unit whole">
|
77
|
+
<div class="grid pane">
|
78
|
+
<div class="unit whole center-on-mobiles">
|
79
|
+
<img src="img/octojekyll.png" alt="Free Jekyll hosting on GitHub Pages">
|
80
|
+
<div class="pane-content">
|
81
|
+
<h2 class="center-on-mobiles"><strong>Free hosting</strong> with GitHub Pages</h2>
|
82
|
+
<p>Sick of dealing with hosting companies? <a href="http://pages.github.com/">GitHub Pages</a> are <em>powered by Jekyll</em>, so you can easily deploy your site using GitHub for free—<a href="https://help.github.com/articles/setting-up-a-custom-domain-with-pages">custom domain name</a> and all.</p>
|
83
|
+
<a href="http://pages.github.com/" class="">Learn more about GitHub Pages →</a>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
<div class="clear"></div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
</section>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
|
2
|
+
* Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
3
|
+
*/
|
4
|
+
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function L(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(k),g.offsetWidth,e=k.value!=l,g.removeChild(k)):e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["­","<style>",a,"</style>"].join(""),k.id=h,m.innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e});var K=function(c,d){var f=c.join(""),g=d.length;y(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch||(j.touch&&j.touch.offsetTop)===9,e.csstransforms3d=(j.csstransforms3d&&j.csstransforms3d.offsetLeft)===9&&j.csstransforms3d.offsetHeight===3,e.generatedcontent=(j.generatedcontent&&j.generatedcontent.offsetHeight)>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",n.join("touch-enabled),("),h,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",n.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',l,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);s.flexbox=function(){return J("flexOrder")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){try{var d=b.createElement("canvas"),e;e=!(!a.WebGLRenderingContext||!d.getContext("experimental-webgl")&&!d.getContext("webgl")),d=c}catch(f){e=!1}return e},s.touch=function(){return e.touch},s.geolocation=function(){return!!navigator.geolocation},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){return e.fontface},s.generatedcontent=function(){return e.generatedcontent},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var M in s)C(s,M)&&(x=M.toLowerCase(),e[x]=s[M](),v.push((e[x]?"":"no-")+x));return e.input||L(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},D(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
|
data/test/helper.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
if RUBY_VERSION > '1.9'
|
2
|
+
require 'simplecov'
|
3
|
+
require 'simplecov-gem-adapter'
|
4
|
+
SimpleCov.start('gem')
|
5
|
+
|
6
|
+
require 'coveralls'
|
7
|
+
Coveralls.wear_merged!
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'rubygems'
|
11
|
+
require 'test/unit'
|
12
|
+
require 'ostruct'
|
13
|
+
gem 'RedCloth', '>= 4.2.1'
|
14
|
+
|
15
|
+
require 'tigefa'
|
16
|
+
|
17
|
+
require 'RedCloth'
|
18
|
+
require 'rdiscount'
|
19
|
+
require 'kramdown'
|
20
|
+
require 'redcarpet'
|
21
|
+
|
22
|
+
require 'redgreen' if RUBY_VERSION < '1.9'
|
23
|
+
require 'shoulda'
|
24
|
+
require 'rr'
|
25
|
+
|
26
|
+
include Tigefa
|
27
|
+
|
28
|
+
# Send STDERR into the void to suppress program output messages
|
29
|
+
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
|
30
|
+
|
31
|
+
class Test::Unit::TestCase
|
32
|
+
include RR::Adapters::TestUnit
|
33
|
+
|
34
|
+
def dest_dir(*subdirs)
|
35
|
+
test_dir('dest', *subdirs)
|
36
|
+
end
|
37
|
+
|
38
|
+
def source_dir(*subdirs)
|
39
|
+
test_dir('source', *subdirs)
|
40
|
+
end
|
41
|
+
|
42
|
+
def clear_dest
|
43
|
+
FileUtils.rm_rf(dest_dir)
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_dir(*subdirs)
|
47
|
+
File.join(File.dirname(__FILE__), *subdirs)
|
48
|
+
end
|
49
|
+
|
50
|
+
def directory_with_contents(path)
|
51
|
+
FileUtils.rm_rf(path)
|
52
|
+
FileUtils.mkdir(path)
|
53
|
+
File.open("#{path}/index.html", "w"){ |f| f.write("I was previously generated.") }
|
54
|
+
end
|
55
|
+
|
56
|
+
def capture_stdout
|
57
|
+
$old_stdout = $stdout
|
58
|
+
$stdout = StringIO.new
|
59
|
+
yield
|
60
|
+
$stdout.rewind
|
61
|
+
return $stdout.string
|
62
|
+
ensure
|
63
|
+
$stdout = $old_stdout
|
64
|
+
end
|
65
|
+
end
|