jekyll 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/lib/jekyll.rb +0 -1
- data/lib/jekyll/collection.rb +18 -3
- data/lib/jekyll/command.rb +0 -25
- data/lib/jekyll/commands/build.rb +7 -2
- data/lib/jekyll/commands/help.rb +33 -0
- data/lib/jekyll/configuration.rb +36 -28
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
- data/lib/jekyll/convertible.rb +43 -20
- data/lib/jekyll/deprecator.rb +15 -8
- data/lib/jekyll/document.rb +21 -4
- data/lib/jekyll/filters.rb +27 -1
- data/lib/jekyll/frontmatter_defaults.rb +46 -12
- data/lib/jekyll/plugin.rb +10 -1
- data/lib/jekyll/post.rb +6 -13
- data/lib/jekyll/related_posts.rb +2 -2
- data/lib/jekyll/renderer.rb +7 -2
- data/lib/jekyll/site.rb +5 -7
- data/lib/jekyll/static_file.rb +24 -4
- data/lib/jekyll/tags/include.rb +3 -1
- data/lib/jekyll/tags/post_url.rb +2 -2
- data/lib/jekyll/utils.rb +88 -69
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_config.yml +6 -4
- data/lib/site_template/_includes/footer.html +43 -49
- data/lib/site_template/_includes/head.html +3 -4
- data/lib/site_template/_includes/header.html +9 -10
- data/lib/site_template/_layouts/default.html +6 -5
- data/lib/site_template/_layouts/page.html +3 -3
- data/lib/site_template/_layouts/post.html +4 -4
- data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +6 -5
- data/lib/site_template/_sass/_base.scss +203 -0
- data/lib/site_template/_sass/_layout.scss +236 -0
- data/lib/site_template/_sass/_syntax-highlighting.scss +67 -0
- data/lib/site_template/css/main.scss +49 -0
- data/lib/site_template/feed.xml +1 -1
- data/lib/site_template/index.html +7 -4
- metadata +24 -431
- data/.gitignore +0 -15
- data/.travis.yml +0 -27
- data/CONTRIBUTING.markdown +0 -91
- data/Gemfile +0 -2
- data/History.markdown +0 -1310
- data/Rakefile +0 -268
- data/cucumber.yml +0 -3
- data/docs/jp/CONTRIBUTING.jp.markdown +0 -93
- data/docs/jp/README.jp.markdown +0 -68
- data/features/collections.feature +0 -145
- data/features/create_sites.feature +0 -158
- data/features/data.feature +0 -105
- data/features/drafts.feature +0 -46
- data/features/embed_filters.feature +0 -107
- data/features/frontmatter_defaults.feature +0 -136
- data/features/include_tag.feature +0 -68
- data/features/markdown.feature +0 -67
- data/features/pagination.feature +0 -82
- data/features/permalinks.feature +0 -85
- data/features/post_data.feature +0 -261
- data/features/post_excerpts.feature +0 -50
- data/features/rendering.feature +0 -34
- data/features/site_configuration.feature +0 -283
- data/features/site_data.feature +0 -107
- data/features/step_definitions/jekyll_steps.rb +0 -201
- data/features/support/env.rb +0 -65
- data/jekyll.gemspec +0 -66
- data/lib/site_template/css/main.css +0 -410
- data/script/bootstrap +0 -4
- data/script/branding +0 -11
- data/script/cibuild +0 -7
- data/script/console +0 -38
- data/script/proof +0 -22
- data/script/rebund +0 -140
- data/script/test +0 -17
- data/site/.gitignore +0 -4
- data/site/CNAME +0 -1
- data/site/README +0 -1
- data/site/_config.yml +0 -9
- data/site/_data/docs.yml +0 -46
- data/site/_includes/analytics.html +0 -30
- data/site/_includes/anchor_links.html +0 -32
- data/site/_includes/css/font-awesome.css +0 -44
- data/site/_includes/css/gridism.css +0 -110
- data/site/_includes/css/normalize.css +0 -1
- data/site/_includes/css/pygments.css +0 -72
- data/site/_includes/css/style.css +0 -1045
- data/site/_includes/docs_contents.html +0 -8
- data/site/_includes/docs_contents_mobile.html +0 -10
- data/site/_includes/docs_option.html +0 -11
- data/site/_includes/docs_ul.html +0 -20
- data/site/_includes/footer.html +0 -15
- data/site/_includes/header.html +0 -18
- data/site/_includes/news_contents.html +0 -33
- data/site/_includes/news_contents_mobile.html +0 -11
- data/site/_includes/news_item.html +0 -24
- data/site/_includes/primary-nav-items.html +0 -17
- data/site/_includes/section_nav.html +0 -22
- data/site/_includes/top.html +0 -17
- data/site/_layouts/default.html +0 -13
- data/site/_layouts/docs.html +0 -23
- data/site/_layouts/news.html +0 -19
- data/site/_layouts/news_item.html +0 -27
- data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +0 -23
- data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +0 -27
- data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +0 -28
- data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +0 -25
- data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +0 -27
- data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +0 -31
- data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +0 -20
- data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +0 -20
- data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +0 -23
- data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +0 -19
- data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +0 -19
- data/site/_posts/2013-11-04-jekyll-1-3-0-released.markdown +0 -43
- data/site/_posts/2013-11-26-jekyll-1-3-1-released.markdown +0 -21
- data/site/_posts/2013-12-07-jekyll-1-4-0-released.markdown +0 -30
- data/site/_posts/2013-12-09-jekyll-1-4-1-released.markdown +0 -20
- data/site/_posts/2013-12-16-jekyll-1-4-2-released.markdown +0 -18
- data/site/_posts/2014-01-13-jekyll-1-4-3-released.markdown +0 -26
- data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +0 -19
- data/site/_posts/2014-03-27-jekyll-1-5-1-released.markdown +0 -26
- data/site/_posts/2014-05-06-jekyll-turns-2-0-0.markdown +0 -31
- data/site/_posts/2014-05-08-jekyll-2-0-3-released.markdown +0 -18
- data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +0 -19
- data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +0 -31
- data/site/_posts/2014-07-01-jekyll-2-1-1-released.markdown +0 -30
- data/site/_posts/2014-07-29-jekyll-2-2-0-released.markdown +0 -19
- data/site/css/screen.css +0 -31
- data/site/docs/assets.md +0 -66
- data/site/docs/collections.md +0 -259
- data/site/docs/configuration.md +0 -536
- data/site/docs/continuous-integration.md +0 -177
- data/site/docs/contributing.md +0 -133
- data/site/docs/datafiles.md +0 -108
- data/site/docs/deployment-methods.md +0 -127
- data/site/docs/drafts.md +0 -21
- data/site/docs/extras.md +0 -18
- data/site/docs/frontmatter.md +0 -191
- data/site/docs/github-pages.md +0 -91
- data/site/docs/history.md +0 -1514
- data/site/docs/index.md +0 -58
- data/site/docs/installation.md +0 -106
- data/site/docs/migrations.md +0 -11
- data/site/docs/pages.md +0 -86
- data/site/docs/pagination.md +0 -212
- data/site/docs/permalinks.md +0 -188
- data/site/docs/plugins.md +0 -561
- data/site/docs/posts.md +0 -211
- data/site/docs/quickstart.md +0 -26
- data/site/docs/resources.md +0 -43
- data/site/docs/sites.md +0 -29
- data/site/docs/structure.md +0 -190
- data/site/docs/templates.md +0 -376
- data/site/docs/troubleshooting.md +0 -147
- data/site/docs/upgrading.md +0 -146
- data/site/docs/usage.md +0 -74
- data/site/docs/variables.md +0 -382
- data/site/docs/windows.md +0 -44
- data/site/favicon.ico +0 -0
- data/site/feed.xml +0 -48
- data/site/fonts/FontAwesome.otf +0 -0
- data/site/fonts/fontawesome-webfont.eot +0 -0
- data/site/fonts/fontawesome-webfont.svg +0 -504
- data/site/fonts/fontawesome-webfont.ttf +0 -0
- data/site/fonts/fontawesome-webfont.woff +0 -0
- data/site/freenode.txt +0 -1
- 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/jekyll-sticker.jpg +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/logo-rss.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/index.html +0 -90
- data/site/js/html5shiv.min.js +0 -4
- data/site/js/respond.min.js +0 -5
- data/site/news/index.html +0 -10
- data/site/news/releases/index.html +0 -10
- data/test/fixtures/broken_front_matter1.erb +0 -5
- data/test/fixtures/broken_front_matter2.erb +0 -4
- data/test/fixtures/broken_front_matter3.erb +0 -7
- data/test/fixtures/exploit_front_matter.erb +0 -4
- data/test/fixtures/front_matter.erb +0 -4
- data/test/helper.rb +0 -80
- data/test/source/+/%# +.md +0 -6
- data/test/source/+/foo.md +0 -7
- data/test/source/.htaccess +0 -8
- data/test/source/_config.dev.toml +0 -2
- data/test/source/_data/categories/dairy.yaml +0 -6
- data/test/source/_data/languages.yml +0 -2
- data/test/source/_data/members.json +0 -12
- data/test/source/_data/members.yaml +0 -7
- data/test/source/_data/products.yml +0 -4
- data/test/source/_drafts/draft-properties.text +0 -11
- data/test/source/_includes/include.html +0 -1
- data/test/source/_includes/params.html +0 -7
- data/test/source/_includes/sig.markdown +0 -3
- data/test/source/_layouts/default.html +0 -27
- data/test/source/_layouts/post/simple.html +0 -1
- data/test/source/_layouts/simple.html +0 -1
- data/test/source/_methods/_do_not_read_me.md +0 -5
- data/test/source/_methods/configuration.md +0 -8
- data/test/source/_methods/sanitized_path.md +0 -5
- data/test/source/_methods/site/_dont_include_me_either.md +0 -5
- data/test/source/_methods/site/generate.md +0 -6
- data/test/source/_methods/site/initialize.md +0 -4
- data/test/source/_methods/um_hi.md +0 -6
- data/test/source/_plugins/dummy.rb +0 -8
- data/test/source/_posts/2008-02-02-not-published.textile +0 -8
- data/test/source/_posts/2008-02-02-published.textile +0 -8
- data/test/source/_posts/2008-10-18-foo-bar.textile +0 -8
- data/test/source/_posts/2008-11-21-complex.textile +0 -8
- data/test/source/_posts/2008-12-03-permalinked-post.textile +0 -9
- data/test/source/_posts/2008-12-13-include.markdown +0 -8
- data/test/source/_posts/2009-01-27-array-categories.textile +0 -10
- data/test/source/_posts/2009-01-27-categories.textile +0 -7
- data/test/source/_posts/2009-01-27-category.textile +0 -7
- data/test/source/_posts/2009-01-27-empty-categories.textile +0 -7
- data/test/source/_posts/2009-01-27-empty-category.textile +0 -7
- data/test/source/_posts/2009-01-27-no-category.textile +0 -6
- data/test/source/_posts/2009-03-12-hash-#1.markdown +0 -6
- data/test/source/_posts/2009-05-18-empty-tag.textile +0 -6
- data/test/source/_posts/2009-05-18-empty-tags.textile +0 -6
- data/test/source/_posts/2009-05-18-tag.textile +0 -6
- data/test/source/_posts/2009-05-18-tags.textile +0 -9
- data/test/source/_posts/2009-06-22-empty-yaml.textile +0 -3
- data/test/source/_posts/2009-06-22-no-yaml.textile +0 -1
- data/test/source/_posts/2010-01-08-triple-dash.markdown +0 -5
- data/test/source/_posts/2010-01-09-date-override.textile +0 -7
- data/test/source/_posts/2010-01-09-time-override.textile +0 -7
- data/test/source/_posts/2010-01-09-timezone-override.textile +0 -7
- data/test/source/_posts/2010-01-16-override-data.textile +0 -4
- data/test/source/_posts/2011-04-12-md-extension.md +0 -7
- data/test/source/_posts/2011-04-12-text-extension.text +0 -0
- data/test/source/_posts/2013-01-02-post-excerpt.markdown +0 -14
- data/test/source/_posts/2013-01-12-nil-layout.textile +0 -6
- data/test/source/_posts/2013-01-12-no-layout.textile +0 -5
- data/test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep +0 -0
- data/test/source/_posts/2013-04-11-custom-excerpt.markdown +0 -10
- data/test/source/_posts/2013-05-10-number-category.textile +0 -7
- data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +0 -23
- data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
- data/test/source/_posts/2013-12-17-include-variable-filters.markdown +0 -21
- data/test/source/_posts/2013-12-20-properties.text +0 -11
- data/test/source/_posts/2014-01-06-permalink-traversal.md +0 -5
- data/test/source/_posts/2014-03-03-yaml-with-dots.md +0 -5
- data/test/source/_posts/2014-03-22-escape-+ %20[].markdown +0 -6
- data/test/source/_posts/es/2008-11-21-nested.textile +0 -8
- data/test/source/_sass/_grid.scss +0 -1
- data/test/source/_slides/example-slide-1.html +0 -4
- data/test/source/_slides/example-slide-2.html +0 -7
- data/test/source/_slides/example-slide-3.html +0 -5
- data/test/source/_with.dots/all.dots/2.4.0.md +0 -5
- data/test/source/_with.dots/file.with.dots.md +0 -0
- data/test/source/about.html +0 -6
- data/test/source/category/_posts/2008-9-23-categories.textile +0 -6
- data/test/source/contacts.html +0 -5
- data/test/source/contacts/bar.html +0 -5
- data/test/source/contacts/index.html +0 -5
- data/test/source/css/main.scss +0 -4
- data/test/source/css/screen.css +0 -76
- data/test/source/deal.with.dots.html +0 -7
- data/test/source/environment.html +0 -5
- data/test/source/exploit.md +0 -5
- data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +0 -8
- data/test/source/index.html +0 -22
- data/test/source/js/coffeescript.coffee +0 -10
- data/test/source/pgp.key +0 -2
- data/test/source/products.yml +0 -4
- data/test/source/properties.html +0 -8
- data/test/source/sitemap.xml +0 -32
- data/test/source/static_files.html +0 -4
- data/test/source/symlink-test/symlinked-file +0 -22
- data/test/source/unpublished.html +0 -7
- data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +0 -7
- data/test/source/z_category/_posts/2008-9-23-categories.textile +0 -6
- data/test/suite.rb +0 -11
- data/test/test_cleaner.rb +0 -77
- data/test/test_coffeescript.rb +0 -49
- data/test/test_collections.rb +0 -224
- data/test/test_command.rb +0 -53
- data/test/test_configuration.rb +0 -201
- data/test/test_convertible.rb +0 -49
- data/test/test_document.rb +0 -193
- data/test/test_draft.rb +0 -56
- data/test/test_entry_filter.rb +0 -124
- data/test/test_excerpt.rb +0 -131
- data/test/test_filters.rb +0 -207
- data/test/test_generated_site.rb +0 -97
- data/test/test_kramdown.rb +0 -62
- data/test/test_layout_reader.rb +0 -34
- data/test/test_liquid_extensions.rb +0 -31
- data/test/test_log_adapter.rb +0 -59
- data/test/test_new_command.rb +0 -104
- data/test/test_page.rb +0 -254
- data/test/test_path_sanitization.rb +0 -18
- data/test/test_post.rb +0 -741
- data/test/test_rdiscount.rb +0 -22
- data/test/test_redcarpet.rb +0 -77
- data/test/test_redcloth.rb +0 -86
- data/test/test_related_posts.rb +0 -47
- data/test/test_sass.rb +0 -26
- data/test/test_site.rb +0 -452
- data/test/test_tags.rb +0 -509
- data/test/test_url.rb +0 -28
- data/test/test_utils.rb +0 -67
data/site/docs/templates.md
DELETED
@@ -1,376 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: docs
|
3
|
-
title: Templates
|
4
|
-
prev_section: migrations
|
5
|
-
next_section: permalinks
|
6
|
-
permalink: /docs/templates/
|
7
|
-
---
|
8
|
-
|
9
|
-
Jekyll uses the [Liquid](http://wiki.shopify.com/Liquid) templating language to
|
10
|
-
process templates. All of the standard Liquid [tags](http://wiki.shopify.com/Logic) and
|
11
|
-
[filters](http://wiki.shopify.com/Filters) are
|
12
|
-
supported. Jekyll even adds a few handy filters and tags of its own to make
|
13
|
-
common tasks easier.
|
14
|
-
|
15
|
-
## Filters
|
16
|
-
|
17
|
-
<div class="mobile-side-scroller">
|
18
|
-
<table>
|
19
|
-
<thead>
|
20
|
-
<tr>
|
21
|
-
<th>Description</th>
|
22
|
-
<th><span class="filter">Filter</span> and <span class="output">Output</span></th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
25
|
-
<tbody>
|
26
|
-
<tr>
|
27
|
-
<td>
|
28
|
-
<p class="name"><strong>Date to XML Schema</strong></p>
|
29
|
-
<p>Convert a Date into XML Schema (ISO 8601) format.</p>
|
30
|
-
</td>
|
31
|
-
<td class="align-center">
|
32
|
-
<p>
|
33
|
-
<code class="filter">{% raw %}{{ site.time | date_to_xmlschema }}{% endraw %}</code>
|
34
|
-
</p>
|
35
|
-
<p>
|
36
|
-
<code class="output">2008-11-07T13:07:54-08:00</code>
|
37
|
-
</p>
|
38
|
-
</td>
|
39
|
-
</tr>
|
40
|
-
<tr>
|
41
|
-
<td>
|
42
|
-
<p class="name"><strong>Date to RFC-822 Format</strong></p>
|
43
|
-
<p>Convert a Date into the RFC-822 format used for RSS feeds.</p>
|
44
|
-
</td>
|
45
|
-
<td class="align-center">
|
46
|
-
<p>
|
47
|
-
<code class="filter">{% raw %}{{ site.time | date_to_rfc822 }}{% endraw %}</code>
|
48
|
-
</p>
|
49
|
-
<p>
|
50
|
-
<code class="output">Mon, 07 Nov 2008 13:07:54 -0800</code>
|
51
|
-
</p>
|
52
|
-
</td>
|
53
|
-
</tr>
|
54
|
-
<tr>
|
55
|
-
<td>
|
56
|
-
<p class="name"><strong>Date to String</strong></p>
|
57
|
-
<p>Convert a date to short format.</p>
|
58
|
-
</td>
|
59
|
-
<td class="align-center">
|
60
|
-
<p>
|
61
|
-
<code class="filter">{% raw %}{{ site.time | date_to_string }}{% endraw %}</code>
|
62
|
-
</p>
|
63
|
-
<p>
|
64
|
-
<code class="output">07 Nov 2008</code>
|
65
|
-
</p>
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
<tr>
|
69
|
-
<td>
|
70
|
-
<p class="name"><strong>Date to Long String</strong></p>
|
71
|
-
<p>Format a date to long format.</p>
|
72
|
-
</td>
|
73
|
-
<td class="align-center">
|
74
|
-
<p>
|
75
|
-
<code class="filter">{% raw %}{{ site.time | date_to_long_string }}{% endraw %}</code>
|
76
|
-
</p>
|
77
|
-
<p>
|
78
|
-
<code class="output">07 November 2008</code>
|
79
|
-
</p>
|
80
|
-
</td>
|
81
|
-
</tr>
|
82
|
-
<tr>
|
83
|
-
<td>
|
84
|
-
<p class="name"><strong>Where</strong></p>
|
85
|
-
<p>Select all the objects in an array where the key has the given value.</p>
|
86
|
-
</td>
|
87
|
-
<td class="align-center">
|
88
|
-
<p>
|
89
|
-
<code class="filter">{% raw %}{{ site.members | where:"graduation_year","2014" }}{% endraw %}</code>
|
90
|
-
</p>
|
91
|
-
</td>
|
92
|
-
</tr>
|
93
|
-
<tr>
|
94
|
-
<td>
|
95
|
-
<p class="name"><strong>Group By</strong></p>
|
96
|
-
<p>Group an array's items by a given property.</p>
|
97
|
-
</td>
|
98
|
-
<td class="align-center">
|
99
|
-
<p>
|
100
|
-
<code class="filter">{% raw %}{{ site.members | group_by:"graduation_year" }}{% endraw %}</code>
|
101
|
-
</p>
|
102
|
-
<p>
|
103
|
-
<code class="output">[{"name"=>"2013", "items"=>[...]},
|
104
|
-
{"name"=>"2014", "items"=>[...]}]</code>
|
105
|
-
</p>
|
106
|
-
</td>
|
107
|
-
</tr>
|
108
|
-
<tr>
|
109
|
-
<td>
|
110
|
-
<p class="name"><strong>XML Escape</strong></p>
|
111
|
-
<p>Escape some text for use in XML.</p>
|
112
|
-
</td>
|
113
|
-
<td class="align-center">
|
114
|
-
<p>
|
115
|
-
<code class="filter">{% raw %}{{ page.content | xml_escape }}{% endraw %}</code>
|
116
|
-
</p>
|
117
|
-
</td>
|
118
|
-
</tr>
|
119
|
-
<tr>
|
120
|
-
<td>
|
121
|
-
<p class="name"><strong>CGI Escape</strong></p>
|
122
|
-
<p>
|
123
|
-
CGI escape a string for use in a URL. Replaces any special characters
|
124
|
-
with appropriate %XX replacements.
|
125
|
-
</p>
|
126
|
-
</td>
|
127
|
-
<td class="align-center">
|
128
|
-
<p>
|
129
|
-
<code class="filter">{% raw %}{{ “foo,bar;baz?” | cgi_escape }}{% endraw %}</code>
|
130
|
-
</p>
|
131
|
-
<p>
|
132
|
-
<code class="output">foo%2Cbar%3Bbaz%3F</code>
|
133
|
-
</p>
|
134
|
-
</td>
|
135
|
-
</tr>
|
136
|
-
<tr>
|
137
|
-
<td>
|
138
|
-
<p class="name"><strong>URI Escape</strong></p>
|
139
|
-
<p>
|
140
|
-
URI escape a string.
|
141
|
-
</p>
|
142
|
-
</td>
|
143
|
-
<td class="align-center">
|
144
|
-
<p>
|
145
|
-
<code class="filter">{% raw %}{{ “'foo, bar \\baz?'” | uri_escape }}{% endraw %}</code>
|
146
|
-
</p>
|
147
|
-
<p>
|
148
|
-
<code class="output">foo,%20bar%20%5Cbaz?</code>
|
149
|
-
</p>
|
150
|
-
</td>
|
151
|
-
</tr>
|
152
|
-
<tr>
|
153
|
-
<td>
|
154
|
-
<p class="name"><strong>Number of Words</strong></p>
|
155
|
-
<p>Count the number of words in some text.</p>
|
156
|
-
</td>
|
157
|
-
<td class="align-center">
|
158
|
-
<p>
|
159
|
-
<code class="filter">{% raw %}{{ page.content | number_of_words }}{% endraw %}</code>
|
160
|
-
</p>
|
161
|
-
<p>
|
162
|
-
<code class="output">1337</code>
|
163
|
-
</p>
|
164
|
-
</td>
|
165
|
-
</tr>
|
166
|
-
<tr>
|
167
|
-
<td>
|
168
|
-
<p class="name"><strong>Array to Sentence</strong></p>
|
169
|
-
<p>Convert an array into a sentence. Useful for listing tags.</p>
|
170
|
-
</td>
|
171
|
-
<td class="align-center">
|
172
|
-
<p>
|
173
|
-
<code class="filter">{% raw %}{{ page.tags | array_to_sentence_string }}{% endraw %}</code>
|
174
|
-
</p>
|
175
|
-
<p>
|
176
|
-
<code class="output">foo, bar, and baz</code>
|
177
|
-
</p>
|
178
|
-
</td>
|
179
|
-
</tr>
|
180
|
-
<tr>
|
181
|
-
<td>
|
182
|
-
<p class="name"><strong>Textilize</strong></p>
|
183
|
-
<p>Convert a Textile-formatted string into HTML, formatted via RedCloth</p>
|
184
|
-
</td>
|
185
|
-
<td class="align-center">
|
186
|
-
<p>
|
187
|
-
<code class="filter">{% raw %}{{ page.excerpt | textilize }}{% endraw %}</code>
|
188
|
-
</p>
|
189
|
-
</td>
|
190
|
-
</tr>
|
191
|
-
<tr>
|
192
|
-
<td>
|
193
|
-
<p class="name"><strong>Markdownify</strong></p>
|
194
|
-
<p>Convert a Markdown-formatted string into HTML.</p>
|
195
|
-
</td>
|
196
|
-
<td class="align-center">
|
197
|
-
<p>
|
198
|
-
<code class="filter">{% raw %}{{ page.excerpt | markdownify }}{% endraw %}</code>
|
199
|
-
</p>
|
200
|
-
</td>
|
201
|
-
</tr>
|
202
|
-
<tr>
|
203
|
-
<td>
|
204
|
-
<p class="name"><strong>Data To JSON</strong></p>
|
205
|
-
<p>Convert Hash or Array to JSON.</p>
|
206
|
-
</td>
|
207
|
-
<td class="align-center">
|
208
|
-
<p>
|
209
|
-
<code class="filter">{% raw %}{{ site.data.projects | jsonify }}{% endraw %}</code>
|
210
|
-
</p>
|
211
|
-
</td>
|
212
|
-
</tr>
|
213
|
-
<tr>
|
214
|
-
<td>
|
215
|
-
<p class="name"><strong>Sort</strong></p>
|
216
|
-
<p>Sort an array. Optional arguments for hashes: 1. property name 2. nils order (<em>first</em> or <em>last</em>).</p>
|
217
|
-
</td>
|
218
|
-
<td class="align-center">
|
219
|
-
<p>
|
220
|
-
<code class="filter">{% raw %}{{ page.tags | sort }}{% endraw %}</code>
|
221
|
-
</p>
|
222
|
-
<p>
|
223
|
-
<code class="filter">{% raw %}{{ site.posts | sort: 'author' }}{% endraw %}</code>
|
224
|
-
</p>
|
225
|
-
<p>
|
226
|
-
<code class="filter">{% raw %}{{ site.pages | sort: 'title', 'last' }}{% endraw %}</code>
|
227
|
-
</p>
|
228
|
-
</td>
|
229
|
-
</tr>
|
230
|
-
</tbody>
|
231
|
-
</table>
|
232
|
-
</div>
|
233
|
-
|
234
|
-
## Tags
|
235
|
-
|
236
|
-
### Includes
|
237
|
-
|
238
|
-
If you have small page fragments that you wish to include in multiple places on
|
239
|
-
your site, you can use the `include` tag.
|
240
|
-
|
241
|
-
{% highlight ruby %}
|
242
|
-
{% raw %}{% include footer.html %}{% endraw %}
|
243
|
-
{% endhighlight %}
|
244
|
-
|
245
|
-
Jekyll expects all include files to be placed in an `_includes` directory at the
|
246
|
-
root of your source directory. This will embed the contents of
|
247
|
-
`<source>/_includes/footer.html` into the calling file.
|
248
|
-
|
249
|
-
<div class="note">
|
250
|
-
<h5>ProTip™: Use variables as file name</h5>
|
251
|
-
<p>
|
252
|
-
|
253
|
-
The name of the file you wish to embed can be literal (as in the example above),
|
254
|
-
or you can use a variable, using liquid-like variable syntax as in
|
255
|
-
<code>{% raw %}{% include {{my_variable}} %}{% endraw %}</code>.
|
256
|
-
|
257
|
-
</p>
|
258
|
-
</div>
|
259
|
-
|
260
|
-
You can also pass parameters to an include:
|
261
|
-
|
262
|
-
{% highlight ruby %}
|
263
|
-
{% raw %}{% include footer.html param="value" %}{% endraw %}
|
264
|
-
{% endhighlight %}
|
265
|
-
|
266
|
-
These parameters are available via Liquid in the include:
|
267
|
-
|
268
|
-
{% highlight ruby %}
|
269
|
-
{% raw %}{{ include.param }}{% endraw %}
|
270
|
-
{% endhighlight %}
|
271
|
-
|
272
|
-
### Code snippet highlighting
|
273
|
-
|
274
|
-
Jekyll has built in support for syntax highlighting of [over 100
|
275
|
-
languages](http://pygments.org/languages/) thanks to
|
276
|
-
[Pygments](http://pygments.org/). To use Pygments, you must have Python installed
|
277
|
-
on your system and set `highlighter` to `pygments` in your site's configuration
|
278
|
-
file.
|
279
|
-
|
280
|
-
Alternatively, you can use [Rouge](https://github.com/jayferd/rouge) to highlight
|
281
|
-
your code snippets. It doesn't support as many languages as Pygments does but
|
282
|
-
it should fit in most cases and it's written in pure Ruby ; you don't need Python
|
283
|
-
on your system!
|
284
|
-
|
285
|
-
To render a code block with syntax highlighting, surround your code as follows:
|
286
|
-
|
287
|
-
{% highlight text %}
|
288
|
-
{% raw %}
|
289
|
-
{% highlight ruby %}
|
290
|
-
def foo
|
291
|
-
puts 'foo'
|
292
|
-
end
|
293
|
-
{% endhighlight %}
|
294
|
-
{% endraw %}
|
295
|
-
{% endhighlight %}
|
296
|
-
|
297
|
-
The argument to the `highlight` tag (`ruby` in the example above) is the
|
298
|
-
language identifier. To find the appropriate identifier to use for the language
|
299
|
-
you want to highlight, look for the “short name” on the [Pygments' Lexers
|
300
|
-
page](http://pygments.org/docs/lexers/) or the [Rouge
|
301
|
-
wiki](https://github.com/jayferd/rouge/wiki/List-of-supported-languages-and-lexers).
|
302
|
-
|
303
|
-
#### Line numbers
|
304
|
-
|
305
|
-
There is a second argument to `highlight` called `linenos` that is optional.
|
306
|
-
Including the `linenos` argument will force the highlighted code to include line
|
307
|
-
numbers. For instance, the following code block would include line numbers next
|
308
|
-
to each line:
|
309
|
-
|
310
|
-
{% highlight text %}
|
311
|
-
{% raw %}
|
312
|
-
{% highlight ruby linenos %}
|
313
|
-
def foo
|
314
|
-
puts 'foo'
|
315
|
-
end
|
316
|
-
{% endhighlight %}
|
317
|
-
{% endraw %}
|
318
|
-
{% endhighlight %}
|
319
|
-
|
320
|
-
#### Stylesheets for syntax highlighting
|
321
|
-
|
322
|
-
In order for the highlighting to show up, you’ll need to include a highlighting
|
323
|
-
stylesheet. For an example stylesheet you can look at
|
324
|
-
[syntax.css](https://github.com/mojombo/tpw/tree/master/css/syntax.css). These
|
325
|
-
are the same styles as used by GitHub and you are free to use them for your own
|
326
|
-
site. If you use `linenos`, you might want to include an additional CSS class
|
327
|
-
definition for the `.lineno` class in `syntax.css` to distinguish the line
|
328
|
-
numbers from the highlighted code.
|
329
|
-
|
330
|
-
### Post URL
|
331
|
-
|
332
|
-
If you would like to include a link to a post on your site, the `post_url` tag
|
333
|
-
will generate the correct permalink URL for the post you specify.
|
334
|
-
|
335
|
-
{% highlight text %}
|
336
|
-
{% raw %}
|
337
|
-
{% post_url 2010-07-21-name-of-post %}
|
338
|
-
{% endraw %}
|
339
|
-
{% endhighlight %}
|
340
|
-
|
341
|
-
If you organize your posts in subdirectories, you need to include subdirectory
|
342
|
-
path to the post:
|
343
|
-
|
344
|
-
{% highlight text %}
|
345
|
-
{% raw %}
|
346
|
-
{% post_url /subdir/2010-07-21-name-of-post %}
|
347
|
-
{% endraw %}
|
348
|
-
{% endhighlight %}
|
349
|
-
|
350
|
-
There is no need to include the file extension when using the `post_url` tag.
|
351
|
-
|
352
|
-
You can also use this tag to create a link to a post in Markdown as follows:
|
353
|
-
|
354
|
-
{% highlight text %}
|
355
|
-
{% raw %}
|
356
|
-
[Name of Link]({% post_url 2010-07-21-name-of-post %})
|
357
|
-
{% endraw %}
|
358
|
-
{% endhighlight %}
|
359
|
-
|
360
|
-
### Gist
|
361
|
-
|
362
|
-
Use the `gist` tag to easily embed a GitHub Gist onto your site. This works with public or secret gists:
|
363
|
-
|
364
|
-
{% highlight text %}
|
365
|
-
{% raw %}
|
366
|
-
{% gist parkr/931c1c8d465a04042403 %}
|
367
|
-
{% endraw %}
|
368
|
-
{% endhighlight %}
|
369
|
-
|
370
|
-
You may also optionally specify the filename in the gist to display:
|
371
|
-
|
372
|
-
{% highlight text %}
|
373
|
-
{% raw %}
|
374
|
-
{% gist parkr/931c1c8d465a04042403 jekyll-private-gist.markdown %}
|
375
|
-
{% endraw %}
|
376
|
-
{% endhighlight %}
|
@@ -1,147 +0,0 @@
|
|
1
|
-
---
|
2
|
-
layout: docs
|
3
|
-
title: Troubleshooting
|
4
|
-
prev_section: deployment-methods
|
5
|
-
next_section: sites
|
6
|
-
permalink: /docs/troubleshooting/
|
7
|
-
---
|
8
|
-
|
9
|
-
If you ever run into problems installing or using Jekyll, here are a few tips
|
10
|
-
that might be of help. If the problem you’re experiencing isn’t covered below,
|
11
|
-
please [report an issue]({{site.help_url}}/issues/new) so the
|
12
|
-
Jekyll community can make everyone’s experience better.
|
13
|
-
|
14
|
-
## Installation Problems
|
15
|
-
|
16
|
-
If you encounter errors during gem installation, you may need to install
|
17
|
-
the header files for compiling extension modules for ruby 1.9.1. This
|
18
|
-
can be done on Ubuntu or Debian by running:
|
19
|
-
|
20
|
-
{% highlight bash %}
|
21
|
-
sudo apt-get install ruby1.9.1-dev
|
22
|
-
{% endhighlight %}
|
23
|
-
|
24
|
-
On Red Hat, CentOS, and Fedora systems you can do this by running:
|
25
|
-
|
26
|
-
{% highlight bash %}
|
27
|
-
sudo yum install ruby-devel
|
28
|
-
{% endhighlight %}
|
29
|
-
|
30
|
-
On [NearlyFreeSpeech](http://nearlyfreespeech.net/) you need to run the
|
31
|
-
following commands before installing Jekyll:
|
32
|
-
|
33
|
-
{% highlight bash %}
|
34
|
-
export GEM_HOME=/home/private/gems
|
35
|
-
export GEM_PATH=/home/private/gems:/usr/local/lib/ruby/gems/1.8/
|
36
|
-
export PATH=$PATH:/home/private/gems/bin
|
37
|
-
export RB_USER_INSTALL='true'
|
38
|
-
{% endhighlight %}
|
39
|
-
|
40
|
-
On OSX, you may need to update RubyGems:
|
41
|
-
|
42
|
-
{% highlight bash %}
|
43
|
-
sudo gem update --system
|
44
|
-
{% endhighlight %}
|
45
|
-
|
46
|
-
If you still have issues, you may need to [use XCode to install Command Line
|
47
|
-
Tools](http://www.zlu.me/ruby/os%20x/gem/mountain%20lion/2012/02/21/install-native-ruby-gem-in-mountain-lion-preview.html)
|
48
|
-
that will allow you to install native gems using the following command:
|
49
|
-
|
50
|
-
{% highlight bash %}
|
51
|
-
sudo gem install jekyll
|
52
|
-
{% endhighlight %}
|
53
|
-
|
54
|
-
To install RubyGems on Gentoo:
|
55
|
-
|
56
|
-
{% highlight bash %}
|
57
|
-
sudo emerge -av dev-ruby/rubygems
|
58
|
-
{% endhighlight %}
|
59
|
-
|
60
|
-
On Windows, you may need to install [RubyInstaller
|
61
|
-
DevKit](https://wiki.github.com/oneclick/rubyinstaller/development-kit).
|
62
|
-
|
63
|
-
## Problems running Jekyll
|
64
|
-
|
65
|
-
On Debian or Ubuntu, you may need to add `/var/lib/gems/1.8/bin/` to your path
|
66
|
-
in order to have the `jekyll` executable be available in your Terminal.
|
67
|
-
|
68
|
-
## Base-URL Problems
|
69
|
-
|
70
|
-
If you are using base-url option like:
|
71
|
-
|
72
|
-
{% highlight bash %}
|
73
|
-
jekyll serve --baseurl '/blog'
|
74
|
-
{% endhighlight %}
|
75
|
-
|
76
|
-
… then make sure that you access the site at:
|
77
|
-
|
78
|
-
{% highlight bash %}
|
79
|
-
http://localhost:4000/blog/index.html
|
80
|
-
{% endhighlight %}
|
81
|
-
|
82
|
-
It won’t work to just access:
|
83
|
-
|
84
|
-
{% highlight bash %}
|
85
|
-
http://localhost:4000/blog
|
86
|
-
{% endhighlight %}
|
87
|
-
|
88
|
-
## Configuration problems
|
89
|
-
|
90
|
-
The order of precedence for conflicting [configuration settings](../configuration/)
|
91
|
-
is as follows:
|
92
|
-
|
93
|
-
1. Command-line flags
|
94
|
-
2. Configuration file settings
|
95
|
-
3. Defaults
|
96
|
-
|
97
|
-
That is: defaults are overridden by options specified in `_config.yml`,
|
98
|
-
and flags specified at the command-line will override all other settings
|
99
|
-
specified elsewhere.
|
100
|
-
|
101
|
-
## Markup Problems
|
102
|
-
|
103
|
-
The various markup engines that Jekyll uses may have some issues. This
|
104
|
-
page will document them to help others who may run into the same
|
105
|
-
problems.
|
106
|
-
|
107
|
-
### Maruku
|
108
|
-
|
109
|
-
If your link has characters that need to be escaped, you need to use
|
110
|
-
this syntax:
|
111
|
-
|
112
|
-
{% highlight text %}
|
113
|
-
![Alt text](http://yuml.me/diagram/class/[Project]->[Task])
|
114
|
-
{% endhighlight %}
|
115
|
-
|
116
|
-
If you have an empty tag, i.e. `<script src="js.js"></script>`, Maruku
|
117
|
-
transforms this into `<script src="js.js" />`. This causes problems in
|
118
|
-
Firefox and possibly other browsers and is [discouraged in
|
119
|
-
XHTML.](http://www.w3.org/TR/xhtml1/#C_3) An easy fix is to put a space
|
120
|
-
between the opening and closing tags.
|
121
|
-
|
122
|
-
### Liquid
|
123
|
-
|
124
|
-
The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in
|
125
|
-
templates. Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the
|
126
|
-
following error:
|
127
|
-
|
128
|
-
{% highlight bash %}
|
129
|
-
'{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
|
130
|
-
{% endhighlight %}
|
131
|
-
|
132
|
-
### Excerpts
|
133
|
-
|
134
|
-
Since v1.0.0, Jekyll has had automatically-generated post excerpts. Since
|
135
|
-
v1.1.0, Jekyll also passes these excerpts through Liquid, which can cause
|
136
|
-
strange errors where references don't exist or a tag hasn't been closed. If you
|
137
|
-
run into these errors, try setting `excerpt_separator: ""` in your
|
138
|
-
`_config.yml`, or set it to some nonsense string.
|
139
|
-
|
140
|
-
<div class="note">
|
141
|
-
<h5>Please report issues you encounter!</h5>
|
142
|
-
<p>
|
143
|
-
If you come across a bug, please <a href="{{ site.help_url }}/issues/new">create an issue</a>
|
144
|
-
on GitHub describing the problem and any work-arounds you find so we can
|
145
|
-
document it here for others.
|
146
|
-
</p>
|
147
|
-
</div>
|