jekyll 2.0.3 → 2.1.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.

Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/CONTRIBUTING.markdown +2 -2
  4. data/History.markdown +86 -0
  5. data/README.markdown +5 -30
  6. data/Rakefile +4 -9
  7. data/docs/jp/CONTRIBUTING.jp.markdown +2 -2
  8. data/docs/jp/README.jp.markdown +1 -2
  9. data/features/collections.feature +40 -3
  10. data/features/data.feature +41 -1
  11. data/features/frontmatter_defaults.feature +57 -0
  12. data/features/post_data.feature +12 -0
  13. data/features/rendering.feature +34 -0
  14. data/features/step_definitions/jekyll_steps.rb +5 -1
  15. data/features/support/env.rb +0 -3
  16. data/jekyll.gemspec +6 -5
  17. data/lib/jekyll.rb +18 -1
  18. data/lib/jekyll/cleaner.rb +22 -2
  19. data/lib/jekyll/collection.rb +9 -2
  20. data/lib/jekyll/command.rb +20 -10
  21. data/lib/jekyll/commands/build.rb +10 -47
  22. data/lib/jekyll/commands/serve.rb +1 -0
  23. data/lib/jekyll/configuration.rb +13 -1
  24. data/lib/jekyll/converters/markdown/redcarpet_parser.rb +9 -2
  25. data/lib/jekyll/convertible.rb +31 -2
  26. data/lib/jekyll/deprecator.rb +1 -1
  27. data/lib/jekyll/document.rb +21 -3
  28. data/lib/jekyll/excerpt.rb +1 -1
  29. data/lib/jekyll/filters.rb +16 -12
  30. data/lib/jekyll/frontmatter_defaults.rb +3 -3
  31. data/lib/jekyll/log_adapter.rb +102 -0
  32. data/lib/jekyll/post.rb +5 -5
  33. data/lib/jekyll/renderer.rb +9 -5
  34. data/lib/jekyll/site.rb +38 -18
  35. data/lib/jekyll/static_file.rb +1 -0
  36. data/lib/jekyll/stevenson.rb +54 -98
  37. data/lib/jekyll/tags/highlight.rb +13 -5
  38. data/lib/jekyll/url.rb +2 -2
  39. data/lib/jekyll/utils.rb +15 -7
  40. data/lib/jekyll/version.rb +1 -1
  41. data/lib/site_template/_config.yml +2 -0
  42. data/lib/site_template/_includes/footer.html +8 -8
  43. data/lib/site_template/_includes/header.html +1 -1
  44. data/lib/site_template/css/main.css +7 -2
  45. data/lib/site_template/feed.xml +10 -1
  46. data/site/_config.yml +1 -0
  47. data/site/_data/docs.yml +1 -0
  48. data/site/_includes/anchor_links.html +28 -23
  49. data/site/_includes/css/font-awesome.css +3 -3
  50. data/site/_includes/css/style.css +4 -0
  51. data/site/_includes/news_contents.html +11 -1
  52. data/site/_includes/top.html +0 -1
  53. data/site/_layouts/default.html +1 -0
  54. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +1 -1
  55. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +1 -1
  56. data/site/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown +19 -0
  57. data/site/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown +27 -0
  58. data/site/docs/collections.md +59 -1
  59. data/site/docs/configuration.md +91 -21
  60. data/site/docs/continuous-integration.md +177 -0
  61. data/site/docs/contributing.md +2 -2
  62. data/site/docs/datafiles.md +47 -3
  63. data/site/docs/deployment-methods.md +3 -3
  64. data/site/docs/extras.md +3 -5
  65. data/site/docs/history.md +86 -0
  66. data/site/docs/installation.md +3 -1
  67. data/site/docs/pagination.md +2 -1
  68. data/site/docs/permalinks.md +4 -4
  69. data/site/docs/plugins.md +6 -0
  70. data/site/docs/quickstart.md +0 -6
  71. data/site/docs/resources.md +1 -1
  72. data/site/docs/templates.md +1 -1
  73. data/site/docs/troubleshooting.md +1 -1
  74. data/site/docs/windows.md +2 -2
  75. data/site/fonts/FontAwesome.otf +0 -0
  76. data/site/fonts/fontawesome-webfont.eot +0 -0
  77. data/site/fonts/fontawesome-webfont.svg +469 -379
  78. data/site/fonts/fontawesome-webfont.ttf +0 -0
  79. data/site/fonts/fontawesome-webfont.woff +0 -0
  80. data/site/img/jekyll-sticker.jpg +0 -0
  81. data/test/helper.rb +0 -3
  82. data/test/source/_data/categories/dairy.yaml +6 -0
  83. data/test/source/_data/members.json +12 -0
  84. data/test/source/_methods/site/initialize.md +1 -2
  85. data/test/source/_posts/2009-01-27-no-category.textile +6 -0
  86. data/test/source/_slides/example-slide-1.html +4 -0
  87. data/test/source/_slides/example-slide-2.html +7 -0
  88. data/test/source/_with.dots/all.dots/2.4.0.md +5 -0
  89. data/test/source/_with.dots/file.with.dots.md +0 -0
  90. data/test/source/environment.html +5 -0
  91. data/test/test_cleaner.rb +77 -0
  92. data/test/test_collections.rb +52 -3
  93. data/test/test_command.rb +25 -28
  94. data/test/test_configuration.rb +10 -1
  95. data/test/test_document.rb +123 -0
  96. data/test/test_excerpt.rb +11 -0
  97. data/test/test_filters.rb +28 -2
  98. data/test/test_generated_site.rb +1 -1
  99. data/test/test_log_adapter.rb +59 -0
  100. data/test/test_post.rb +77 -0
  101. data/test/test_site.rb +51 -0
  102. data/test/test_tags.rb +11 -114
  103. data/test/test_utils.rb +2 -2
  104. metadata +76 -39
  105. data/lib/jekyll/generators/pagination.rb +0 -217
  106. data/lib/jekyll/tags/gist.rb +0 -47
  107. data/test/test_pager.rb +0 -118
@@ -4,9 +4,11 @@ module Jekyll
4
4
  include Liquid::StandardFilters
5
5
 
6
6
  # The regular expression syntax checker. Start with the language specifier.
7
- # Follow that by zero or more space separated options that take one of two
8
- # forms: name or name=value
9
- SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=\w+)?)*)$/
7
+ # Follow that by zero or more space separated options that take one of three
8
+ # forms: name, name=value, or name="<quoted list>"
9
+ #
10
+ # <quoted list> is a space-separated list of numbers
11
+ SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$/
10
12
 
11
13
  def initialize(tag_name, markup, tokens)
12
14
  super
@@ -14,8 +16,14 @@ module Jekyll
14
16
  @lang = $1.downcase
15
17
  @options = {}
16
18
  if defined?($2) && $2 != ''
17
- $2.split.each do |opt|
19
+ # Split along 3 possible forms -- key="<quoted list>", key=value, or key
20
+ $2.scan(/(?:\w="[^"]*"|\w=\w|\w)+/) do |opt|
18
21
  key, value = opt.split('=')
22
+ # If a quoted list, convert to array
23
+ if value && value.include?("\"")
24
+ value.gsub!(/"/, "")
25
+ value = value.split
26
+ end
19
27
  @options[key.to_sym] = value || true
20
28
  end
21
29
  end
@@ -83,7 +91,7 @@ eos
83
91
 
84
92
  def add_code_tag(code)
85
93
  # Add nested <code> tags to code blocks
86
- code = code.sub(/<pre>\n*/,'<pre><code class="' + @lang.to_s.gsub("+", "-") + '">')
94
+ code = code.sub(/<pre>\n*/,'<pre><code class="language-' + @lang.to_s.gsub("+", "-") + '" data-lang="' + @lang.to_s + '">')
87
95
  code = code.sub(/\n*<\/pre>/,"</code></pre>")
88
96
  code.strip
89
97
  end
@@ -89,7 +89,7 @@ module Jekyll
89
89
  # pct-encoded = "%" HEXDIG HEXDIG
90
90
  # sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
91
91
  # / "*" / "+" / "," / ";" / "="
92
- URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/)
92
+ URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/).encode('utf-8')
93
93
  end
94
94
 
95
95
  # Unescapes a URL path segment
@@ -103,7 +103,7 @@ module Jekyll
103
103
  #
104
104
  # Returns the unescaped path.
105
105
  def self.unescape_path(path)
106
- URI.unescape(path)
106
+ URI.unescape(path.encode('utf-8'))
107
107
  end
108
108
  end
109
109
  end
@@ -35,17 +35,25 @@ module Jekyll
35
35
  #
36
36
  # Returns an array
37
37
  def pluralized_array_from_hash(hash, singular_key, plural_key)
38
- if hash.has_key?(singular_key)
39
- array = [hash[singular_key]] if hash[singular_key]
40
- elsif hash.has_key?(plural_key)
41
- case hash[plural_key]
38
+ [].tap do |array|
39
+ array << (value_from_singular_key(hash, singular_key) || value_from_plural_key(hash, plural_key))
40
+ end.flatten.compact
41
+ end
42
+
43
+ def value_from_singular_key(hash, key)
44
+ hash[key] if (hash.has_key?(key) || (hash.default_proc && hash[key]))
45
+ end
46
+
47
+ def value_from_plural_key(hash, key)
48
+ if hash.has_key?(key) || (hash.default_proc && hash[key])
49
+ val = hash[key]
50
+ case val
42
51
  when String
43
- array = hash[plural_key].split
52
+ val.split
44
53
  when Array
45
- array = hash[plural_key].compact
54
+ val.compact
46
55
  end
47
56
  end
48
- array || []
49
57
  end
50
58
 
51
59
  def transform_keys(hash)
@@ -1,3 +1,3 @@
1
1
  module Jekyll
2
- VERSION = '2.0.3'
2
+ VERSION = '2.1.0'
3
3
  end
@@ -4,6 +4,8 @@ email: your-email@domain.com
4
4
  description: "Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
5
5
  baseurl: ""
6
6
  url: "http://yourdomain.com"
7
+ twitter_username: jekyllrb
8
+ github_username: jekyll
7
9
 
8
10
  # Build settings
9
11
  markdown: kramdown
@@ -13,8 +13,8 @@
13
13
 
14
14
  <div class="footer-col-2 column">
15
15
  <ul>
16
- <li>
17
- <a href="https://github.com/{{ site.username }}">
16
+ {% if site.github_username %}<li>
17
+ <a href="https://github.com/{{ site.github_username }}">
18
18
  <span class="icon github">
19
19
  <svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
20
20
  viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
@@ -29,11 +29,11 @@
29
29
  c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
30
30
  </svg>
31
31
  </span>
32
- <span class="username">{{ site.username }}</span>
32
+ <span class="username">{{ site.github_username }}</span>
33
33
  </a>
34
- </li>
35
- <li>
36
- <a href="https://twitter.com/{{ site.username }}">
34
+ </li>{% endif %}
35
+ {% if site.twitter_username %}<li>
36
+ <a href="https://twitter.com/{{ site.twitter_username }}">
37
37
  <span class="icon twitter">
38
38
  <svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
39
39
  viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
@@ -46,9 +46,9 @@
46
46
  c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
47
47
  </svg>
48
48
  </span>
49
- <span class="username">{{ site.username }}</span>
49
+ <span class="username">{{ site.twitter_username }}</span>
50
50
  </a>
51
- </li>
51
+ </li>{% endif %}
52
52
  </ul>
53
53
  </div>
54
54
 
@@ -18,7 +18,7 @@
18
18
  </a>
19
19
  <div class="trigger">
20
20
  {% for page in site.pages %}
21
- <a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
21
+ {% if page.title %}<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>{% endif %}
22
22
  {% endfor %}
23
23
  </div>
24
24
  </nav>
@@ -234,6 +234,7 @@ a:visited { color: #205caa; }
234
234
  -moz-border-radius: 3px;
235
235
  border-radius: 3px;
236
236
  font-size: 15px;
237
+ overflow:scroll;
237
238
  }
238
239
 
239
240
  .post code { padding: 1px 5px; }
@@ -241,7 +242,11 @@ a:visited { color: #205caa; }
241
242
  .post ul,
242
243
  .post ol { margin-left: 1.35em; }
243
244
 
244
- .post pre code { border: none; }
245
+ .post pre code {
246
+ border: 0;
247
+ padding-right: 0;
248
+ padding-left: 0;
249
+ }
245
250
 
246
251
  /* terminal */
247
252
  .post pre.terminal {
@@ -402,4 +407,4 @@ a:visited { color: #205caa; }
402
407
  width: auto;
403
408
  margin: 0 0 15px; }
404
409
 
405
- }
410
+ }
@@ -8,13 +8,22 @@ layout: none
8
8
  <description>{{ site.description | xml_escape }}</description>
9
9
  <link>{{ site.url }}{{ site.baseurl }}/</link>
10
10
  <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
11
+ <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
12
+ <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
13
+ <generator>Jekyll v{{ jekyll.version }}</generator>
11
14
  {% for post in site.posts limit:10 %}
12
15
  <item>
13
16
  <title>{{ post.title | xml_escape }}</title>
14
17
  <description>{{ post.content | xml_escape }}</description>
15
- <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
18
+ <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
16
19
  <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
17
20
  <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
21
+ {% for tag in post.tags %}
22
+ <category>{{ tag | xml_escape }}</category>
23
+ {% endfor %}
24
+ {% for cat in post.categories %}
25
+ <category>{{ cat | xml_escape }}</category>
26
+ {% endfor %}
18
27
  </item>
19
28
  {% endfor %}
20
29
  </channel>
@@ -7,3 +7,4 @@ excerpt_separator: noifniof3nioaniof3nioafafinoafnoif
7
7
  repository: https://github.com/jekyll/jekyll
8
8
  help_url: https://github.com/jekyll/jekyll-help
9
9
  google_analytics_id: UA-50755011-1
10
+ timezone: America/Los_Angeles
@@ -31,6 +31,7 @@
31
31
  docs:
32
32
  - github-pages
33
33
  - deployment-methods
34
+ - continuous-integration
34
35
 
35
36
  - title: Miscellaneous
36
37
  docs:
@@ -1,27 +1,32 @@
1
- <script type="text/javascript" charset="utf-8">
2
- var anchorForId = function(id){
1
+ <script>
2
+ var anchorForId = function (id) {
3
+ var anchor = document.createElement("a");
4
+ anchor.className = "header-link";
5
+ anchor.href = "#" + id;
6
+ anchor.innerHTML = "<i class=\"fa fa-link\"></i>";
7
+ return anchor;
8
+ };
3
9
 
4
- var anchor = document.createElement("a");
5
- anchor.className = "header-link";
6
- anchor.href = "#" + id;
7
- anchor.innerHTML = '<i class="fa fa-link"></i>';
8
- return anchor;
9
- }
10
- var linkifyAnchors = function(level, containingElement) {
10
+ var linkifyAnchors = function (level, containingElement) {
11
+ var headers = containingElement.getElementsByTagName("h" + level);
12
+ for (var h = 0; h < headers.length; h++) {
13
+ var header = headers[h];
11
14
 
12
- var headers = containingElement.getElementsByTagName("h"+level);
13
- for(var h=0; h<headers.length; h++){
14
- var header = headers[h];
15
+ if (typeof header.id !== "undefined" && header.id !== "") {
16
+ header.appendChild(anchorForId(header.id));
17
+ }
18
+ }
19
+ };
15
20
 
16
- if( typeof(header.id) !== "undefined" && header.id !== "" )
17
- header.appendChild(anchorForId(header.id));
18
- }
19
- };
20
- document.onreadystatechange = function(){
21
- if(this.readyState === "complete"){
22
- var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0]
23
- for(var level=1; level<=6; level++)
24
- linkifyAnchors(level, contentBlock);
25
- }
26
- }
21
+ document.onreadystatechange = function () {
22
+ if (this.readyState === "complete") {
23
+ var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
24
+ if (!contentBlock) {
25
+ return;
26
+ }
27
+ for (var level = 1; level <= 6; level++) {
28
+ linkifyAnchors(level, contentBlock);
29
+ }
30
+ }
31
+ };
27
32
  </script>
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
2
+ * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
3
3
  * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4
4
  */
5
5
  @font-face {
6
6
  font-family: 'FontAwesome';
7
- src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
8
- src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
7
+ src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
8
+ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
9
9
  font-weight: normal;
10
10
  font-style: normal;
11
11
  }
@@ -590,6 +590,10 @@ article h2:first-child {
590
590
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
591
591
  }
592
592
 
593
+ .post-content img {
594
+ max-width: 100%
595
+ }
596
+
593
597
  .label {
594
598
  float: left;
595
599
  text-transform: uppercase;
@@ -10,7 +10,7 @@
10
10
  </ul>
11
11
  <h4>Recent Releases</h4>
12
12
  <ul>
13
- {% for post in site.posts limit:5 %}
13
+ {% for post in site.categories.release limit:5 %}
14
14
  <li class="{% if page.title == post.title %}current{% endif %}">
15
15
  <a href="{{ post.url }}">Version {{ post.version }}</a>
16
16
  </li>
@@ -19,5 +19,15 @@
19
19
  <a href="/docs/history/">History »</a>
20
20
  </li>
21
21
  </ul>
22
+ <h4>Other News</h4>
23
+ <ul>
24
+ {% for post in site.posts %}
25
+ {% unless post.categories contains 'release' %}
26
+ <li class="{% if page.title == post.title %}current{% endif %}">
27
+ <a href="{{ post.url }}">{{ post.title }}</a>
28
+ </li>
29
+ {% endunless %}
30
+ {% endfor %}
31
+ </ul>
22
32
  </aside>
23
33
  </div>
@@ -10,7 +10,6 @@
10
10
  <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
11
11
  <link rel="stylesheet" href="/css/screen.css">
12
12
  <link rel="icon" type="image/x-icon" href="/favicon.ico">
13
- {% include anchor_links.html %}
14
13
  <!--[if lt IE 9]>
15
14
  <script src="/js/html5shiv.min.js"></script>
16
15
  <script src="/js/respond.min.js"></script>
@@ -6,6 +6,7 @@
6
6
  {{ content }}
7
7
 
8
8
  {% include footer.html %}
9
+ {% include anchor_links.html %}
9
10
  {% include analytics.html %}
10
11
 
11
12
  </body>
@@ -13,7 +13,7 @@ Community and custom plugins extending the `Liquid::Drop` class may inadvertentl
13
13
 
14
14
  We recommend you upgrade to Jekyll v1.0.4 immediately if you use `Liquid::Drop` plugins on your Jekyll site.
15
15
 
16
- Many thanks for [Ben Balter](http://github.com/benbalter) for alerting us to the problem
16
+ Many thanks for [Ben Balter](https://github.com/benbalter) for alerting us to the problem
17
17
  and [submitting a patch][1349] so quickly.
18
18
 
19
19
  [230]: https://github.com/Shopify/liquid/pull/230
@@ -13,7 +13,7 @@ Community and custom plugins extending the `Liquid::Drop` class may inadvertentl
13
13
 
14
14
  We recommend you upgrade to Jekyll v1.1.2 immediately if you use `Liquid::Drop` plugins on your Jekyll site.
15
15
 
16
- Many thanks for [Ben Balter](http://github.com/benbalter) for alerting us to the problem
16
+ Many thanks for [Ben Balter](https://github.com/benbalter) for alerting us to the problem
17
17
  and [submitting a patch][1349] so quickly.
18
18
 
19
19
  [230]: https://github.com/Shopify/liquid/pull/230
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: news_item
3
+ title: 'Pick Up your $1 Jekyll Sticker'
4
+ date: 2014-06-04 15:46:53 -0400
5
+ author: parkr
6
+ categories: [partners]
7
+ ---
8
+
9
+ ![Jekyll Sticker](/img/jekyll-sticker.jpg)
10
+
11
+ You may have heard that [@cobyism](https://github.com/cobyism)'s excellent
12
+ Jekyll logo has been made into a sticker. You may have sat idly by, wishing
13
+ that you could have a sticker honoring your beloved Jekyll.
14
+
15
+ The StickerMule team says, *"Pine no longer!"* StickerMule has **[discounted the
16
+ price of Jekyll stickers down to $1 and are offering free (domestic)
17
+ shipping](http://www.stickermule.com/marketplace/825-jekyll-stickers)!**
18
+ Go grab one now on the StickerMule marketplace – [they'll look
19
+ swell on your favourite hardware.](https://twitter.com/parkr/status/430826309707902976/photo/1)
@@ -0,0 +1,27 @@
1
+ ---
2
+ layout: news_item
3
+ title: 'Jekyll Turns 21! Err... I mean 2.1.0.'
4
+ date: 2014-06-28 17:26:59 -0400
5
+ author: parkr
6
+ version: 2.1.0
7
+ categories: [release]
8
+ ---
9
+
10
+ Jekyll's finally [legal to drink in the States](http://en.wikipedia.org/wiki/Legal_drinking_age).
11
+ And he's done a lot of learning in the process! Here are some of the new
12
+ things to look forward to:
13
+
14
+ - Uses the latest Liquid version (2.6.1) (#2495)
15
+ - Set front-matter defaults for collections (#2419)
16
+ - Set a collection-specific URL template (#2418)
17
+ - `pygments.rb` 0.6.0! (#2504)
18
+ - `.json` files in `_data` (#2369)
19
+ - Allow subdirectories in `_data` (#2395)
20
+ - Add support for `hl_lines` in `highlight` tag (#2532)
21
+ - Post categories now merge with directory, front-matter, and defaults (#2373)
22
+ - New `--skip_initial_build` flag for `jekyll serve` (#2477)
23
+ - A bajilion bug fixes and site updates!
24
+
25
+ Let's go party!
26
+
27
+ *Check out the [full changelog](/docs/history/) for more.*
@@ -56,6 +56,54 @@ For example, if you have `_my_collection/some_subdir/some_doc.md`,
56
56
  it will be rendered using Liquid and the Markdown converter of your
57
57
  choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
58
58
 
59
+ As for posts with [Permalinks](../Permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
60
+
61
+ {% highlight yaml %}
62
+ collections:
63
+ my_collection:
64
+ output: true
65
+ permalink: /awesome/:path/
66
+ {% endhighlight %}
67
+
68
+ For example, if you have `_my_collection/some_subdir/some_doc.md`, it will be written out to `<dest>/awesome/some_subdir/some_doc/index.html`.
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>
81
+ <p><code>collection</code></p>
82
+ </td>
83
+ <td>
84
+ <p>Label of the containing collection</p>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td>
89
+ <p><code>path</code></p>
90
+ </td>
91
+ <td>
92
+ <p>Path to the document relative to the collection's directory</p>
93
+ </td>
94
+ </tr>
95
+ <tr>
96
+ <td>
97
+ <p><code>output_ext</code></p>
98
+ </td>
99
+ <td>
100
+ <p>Extension of the output file</p>
101
+ </td>
102
+ </tr>
103
+ </tbody>
104
+ </table>
105
+ </div>
106
+
59
107
  ## Liquid Attributes
60
108
 
61
109
  ### Collections
@@ -109,7 +157,7 @@ The collections are also available under `site.collections`, with the metadata y
109
157
  </td>
110
158
  <td>
111
159
  <p>
112
- The full path to the collections's source directory..
160
+ The full path to the collections's source directory.
113
161
  </p>
114
162
  </td>
115
163
  </tr>
@@ -196,6 +244,16 @@ In addition to any YAML front-matter provided in the document's corresponding fi
196
244
  </p>
197
245
  </td>
198
246
  </tr>
247
+ <tr>
248
+ <td>
249
+ <p><code>collection</code></p>
250
+ </td>
251
+ <td>
252
+ <p>
253
+ The name of the document's collection.
254
+ </p>
255
+ </td>
256
+ </tr>
199
257
  </tbody>
200
258
  </table>
201
259
  </div>