jekyll 1.1.2 → 1.2.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 (75) hide show
  1. checksums.yaml +6 -14
  2. data/History.markdown +71 -0
  3. data/README.markdown +13 -3
  4. data/Rakefile +11 -2
  5. data/bin/jekyll +6 -5
  6. data/features/permalinks.feature +20 -0
  7. data/features/site_data.feature +6 -0
  8. data/features/step_definitions/jekyll_steps.rb +1 -1
  9. data/jekyll.gemspec +8 -3
  10. data/lib/jekyll.rb +3 -1
  11. data/lib/jekyll/cleaner.rb +73 -0
  12. data/lib/jekyll/commands/doctor.rb +40 -2
  13. data/lib/jekyll/commands/new.rb +2 -2
  14. data/lib/jekyll/commands/serve.rb +10 -3
  15. data/lib/jekyll/configuration.rb +14 -1
  16. data/lib/jekyll/converters/markdown.rb +1 -1
  17. data/lib/jekyll/converters/markdown/kramdown_parser.rb +4 -8
  18. data/lib/jekyll/converters/markdown/rdiscount_parser.rb +3 -1
  19. data/lib/jekyll/convertible.rb +14 -4
  20. data/lib/jekyll/core_ext.rb +0 -8
  21. data/lib/jekyll/deprecator.rb +13 -9
  22. data/lib/jekyll/generators/pagination.rb +1 -1
  23. data/lib/jekyll/page.rb +33 -34
  24. data/lib/jekyll/post.rb +48 -51
  25. data/lib/jekyll/site.rb +11 -50
  26. data/lib/jekyll/stevenson.rb +1 -1
  27. data/lib/jekyll/tags/include.rb +19 -13
  28. data/lib/jekyll/url.rb +67 -0
  29. data/lib/site_template/_layouts/default.html +20 -22
  30. data/site/_config.yml +3 -1
  31. data/site/_includes/docs_contents.html +50 -50
  32. data/site/_includes/docs_contents_mobile.html +25 -25
  33. data/site/_includes/footer.html +1 -1
  34. data/site/_includes/primary-nav-items.html +3 -3
  35. data/site/_includes/section_nav.html +2 -2
  36. data/site/_includes/top.html +1 -1
  37. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +1 -1
  38. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +1 -1
  39. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +1 -1
  40. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +2 -2
  41. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +4 -4
  42. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +7 -7
  43. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +6 -6
  44. data/site/_posts/2013-09-06-jekyll-1-2-0-released.markdown +23 -0
  45. data/site/css/normalize.css +1 -504
  46. data/site/docs/configuration.md +46 -6
  47. data/site/docs/contributing.md +3 -3
  48. data/site/docs/deployment-methods.md +2 -2
  49. data/site/docs/frontmatter.md +2 -2
  50. data/site/docs/github-pages.md +2 -2
  51. data/site/docs/history.md +265 -265
  52. data/site/docs/index.md +1 -1
  53. data/site/docs/installation.md +4 -4
  54. data/site/docs/migrations.md +14 -11
  55. data/site/docs/pages.md +1 -1
  56. data/site/docs/pagination.md +1 -1
  57. data/site/docs/permalinks.md +2 -2
  58. data/site/docs/plugins.md +18 -10
  59. data/site/docs/posts.md +9 -8
  60. data/site/docs/resources.md +2 -2
  61. data/site/docs/sites.md +1 -1
  62. data/site/docs/structure.md +9 -9
  63. data/site/docs/templates.md +4 -3
  64. data/site/docs/troubleshooting.md +11 -3
  65. data/site/docs/usage.md +8 -3
  66. data/site/docs/variables.md +7 -7
  67. data/site/feed.xml +1 -1
  68. data/site/index.html +3 -3
  69. data/test/source/_posts/2013-08-01-mkdn-extension.mkdn +0 -0
  70. data/test/test_configuration.rb +14 -0
  71. data/test/test_excerpt.rb +16 -0
  72. data/test/test_generated_site.rb +1 -1
  73. data/test/test_post.rb +7 -0
  74. data/test/test_url.rb +28 -0
  75. metadata +27 -21
@@ -7,7 +7,7 @@ permalink: /docs/variables/
7
7
  ---
8
8
 
9
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
10
+ Front Matter](../frontmatter/) are subject to processing. For each of these
11
11
  files, Jekyll makes a variety of data available via the [Liquid templating
12
12
  system](http://wiki.github.com/shopify/liquid/liquid-for-designers). The
13
13
  following is a reference of the available data.
@@ -36,7 +36,7 @@ following is a reference of the available data.
36
36
  <td><p><code>page</code></p></td>
37
37
  <td><p>
38
38
 
39
- Page specific information + the <a href="../frontmatter">YAML Front
39
+ Page specific information + the <a href="../frontmatter/">YAML Front
40
40
  Matter</a>. Custom variables set via the YAML front matter will be
41
41
  available here. See below for details.
42
42
 
@@ -57,7 +57,7 @@ following is a reference of the available data.
57
57
 
58
58
  When the <code>paginate</code> configuration option is set, this
59
59
  variable becomes available for use. See <a
60
- href="../pagination">Pagination</a> for details.
60
+ href="../pagination/">Pagination</a> for details.
61
61
 
62
62
  </p></td>
63
63
  </tr>
@@ -221,7 +221,7 @@ following is a reference of the available data.
221
221
  directory. For example, a post at
222
222
  <code>/work/code/_posts/2008-12-24-closures.md</code> would have this
223
223
  field set to <code>['work', 'code']</code>. These can also be specified
224
- in the <a href="../frontmatter">YAML Front Matter</a>.
224
+ in the <a href="../frontmatter/">YAML Front Matter</a>.
225
225
 
226
226
  </p></td>
227
227
  </tr>
@@ -230,7 +230,7 @@ following is a reference of the available data.
230
230
  <td><p>
231
231
 
232
232
  The list of tags to which this post belongs. These can be specified in
233
- the <a href="../frontmatter">YAML Front Matter</a>.
233
+ the <a href="../frontmatter/">YAML Front Matter</a>.
234
234
 
235
235
  </p></td>
236
236
  </tr>
@@ -239,8 +239,8 @@ following is a reference of the available data.
239
239
  <td><p>
240
240
 
241
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>.
242
+ page or posts source on GitHub. This can be overridden in the
243
+ <a href="../frontmatter/">YAML Front Matter</a>.
244
244
 
245
245
  </p></td>
246
246
  </tr>
@@ -22,7 +22,7 @@ permalink: /feed.xml
22
22
  <description>Transform your plain text into static websites and blogs.</description>
23
23
  {% for post in site.posts %}
24
24
  <item>
25
- <title>{{ post.title }}</title>
25
+ <title>{{ post.title | xml_escape}}</title>
26
26
  <link>http://jekyllrb.com{{ post.url }}</link>
27
27
  <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
28
28
  <dc:creator>{{ post.author }}</dc:creator>
@@ -18,19 +18,19 @@ overview: true
18
18
  <p>
19
19
  No more databases, comment moderation, or pesky updates to install—just <em>your content</em>.
20
20
  </p>
21
- <a href="/docs/usage" class="">How Jekyll works &rarr;</a>
21
+ <a href="/docs/usage/" class="">How Jekyll works &rarr;</a>
22
22
  </div>
23
23
  <div class="unit one-third">
24
24
  <h2>Static</h2>
25
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">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
26
- <a href="/docs/templates" class="">Jekyll template guide &rarr;</a>
26
+ <a href="/docs/templates/" class="">Jekyll template guide &rarr;</a>
27
27
  </div>
28
28
  <div class="unit one-third">
29
29
  <h2>Blog-aware</h2>
30
30
  <p>
31
31
  Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.
32
32
  </p>
33
- <a href="/docs/migrations" class="">Migrate your blog &rarr;</a>
33
+ <a href="/docs/migrations/" class="">Migrate your blog &rarr;</a>
34
34
  </div>
35
35
  <div class="clear"></div>
36
36
  </div>
@@ -79,6 +79,20 @@ class TestConfiguration < Test::Unit::TestCase
79
79
  assert_equal @config.backwards_compatibilize["include"], %w[STOP_THE_PRESSES.txt .heloses .git]
80
80
  end
81
81
  end
82
+ context "#fix_common_issues" do
83
+ setup do
84
+ @config = Proc.new do |val|
85
+ Configuration[{
86
+ 'paginate' => val
87
+ }]
88
+ end
89
+ end
90
+ should "sets an invalid 'paginate' value to nil" do
91
+ assert_nil @config.call(0).fix_common_issues['paginate']
92
+ assert_nil @config.call(-1).fix_common_issues['paginate']
93
+ assert_nil @config.call(true).fix_common_issues['paginate']
94
+ end
95
+ end
82
96
  context "loading configuration" do
83
97
  setup do
84
98
  @path = File.join(Dir.pwd, '_config.yml')
@@ -10,6 +10,22 @@ class TestExcerpt < Test::Unit::TestCase
10
10
  post.render(layouts, {"site" => {"posts" => []}})
11
11
  end
12
12
 
13
+ context "With extraction disabled" do
14
+ setup do
15
+ clear_dest
16
+ stub(Jekyll).configuration do
17
+ Jekyll::Configuration::DEFAULTS.merge({'excerpt_separator' => ''})
18
+ end
19
+ @site = Site.new(Jekyll.configuration)
20
+ @post = setup_post("2013-07-22-post-excerpt-with-layout.markdown")
21
+ end
22
+
23
+ should "not be generated" do
24
+ excerpt = @post.send(:extract_excerpt)
25
+ assert_equal true, excerpt.empty?
26
+ end
27
+ end
28
+
13
29
  context "An extracted excerpt" do
14
30
  setup do
15
31
  clear_dest
@@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  should "ensure post count is as expected" do
17
- assert_equal 35, @site.posts.size
17
+ assert_equal 36, @site.posts.size
18
18
  end
19
19
 
20
20
  should "insert site.posts into the index" do
@@ -562,6 +562,13 @@ class TestPost < Test::Unit::TestCase
562
562
  assert conv.kind_of? Jekyll::Converters::Markdown
563
563
  end
564
564
 
565
+ should "process .mkdn under text if it is not in the markdown config" do
566
+ @site.config['markdown_ext'] = 'markdown,mkd,md,text'
567
+ post = setup_post '2013-08-01-mkdn-extension.mkdn'
568
+ conv = post.converter
569
+ assert conv.kind_of? Jekyll::Converters::Identity
570
+ end
571
+
565
572
  should "process .text as textile under alternate configuration" do
566
573
  @site.config['textile_ext'] = 'textile,text'
567
574
  post = setup_post '2011-04-12-text-extension.text'
@@ -0,0 +1,28 @@
1
+ require 'helper'
2
+
3
+ class TestURL < Test::Unit::TestCase
4
+ context "The URL class" do
5
+
6
+ should "throw an exception if neither permalink or template is specified" do
7
+ assert_raises ArgumentError do
8
+ URL.new(:placeholders => {})
9
+ end
10
+ end
11
+
12
+ should "replace placeholders in templates" do
13
+ assert_equal "/foo/bar", URL.new(
14
+ :template => "/:x/:y",
15
+ :placeholders => {:x => "foo", :y => "bar"}
16
+ ).to_s
17
+ end
18
+
19
+ should "return permalink if given" do
20
+ assert_equal "/le/perma/link", URL.new(
21
+ :template => "/:x/:y",
22
+ :placeholders => {:x => "foo", :y => "bar"},
23
+ :permalink => "/le/perma/link"
24
+ ).to_s
25
+ end
26
+
27
+ end
28
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2013-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.5'
69
- - !ruby/object:Gem::Dependency
70
- name: kramdown
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
74
- - !ruby/object:Gem::Version
75
- version: 1.0.2
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ~>
81
- - !ruby/object:Gem::Version
82
- version: 1.0.2
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: pygments.rb
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -227,7 +213,7 @@ dependencies:
227
213
  - - ~>
228
214
  - !ruby/object:Gem::Version
229
215
  version: 1.2.1
230
- - - ! '!='
216
+ - - '!='
231
217
  - !ruby/object:Gem::Version
232
218
  version: 1.2.4
233
219
  type: :development
@@ -237,7 +223,7 @@ dependencies:
237
223
  - - ~>
238
224
  - !ruby/object:Gem::Version
239
225
  version: 1.2.1
240
- - - ! '!='
226
+ - - '!='
241
227
  - !ruby/object:Gem::Version
242
228
  version: 1.2.4
243
229
  - !ruby/object:Gem::Dependency
@@ -254,6 +240,20 @@ dependencies:
254
240
  - - ~>
255
241
  - !ruby/object:Gem::Version
256
242
  version: '4.2'
243
+ - !ruby/object:Gem::Dependency
244
+ name: kramdown
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ~>
248
+ - !ruby/object:Gem::Version
249
+ version: 1.0.2
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ~>
255
+ - !ruby/object:Gem::Version
256
+ version: 1.0.2
257
257
  - !ruby/object:Gem::Dependency
258
258
  name: rdiscount
259
259
  requirement: !ruby/object:Gem::Requirement
@@ -356,6 +356,7 @@ files:
356
356
  - features/support/env.rb
357
357
  - jekyll.gemspec
358
358
  - lib/jekyll.rb
359
+ - lib/jekyll/cleaner.rb
359
360
  - lib/jekyll/command.rb
360
361
  - lib/jekyll/commands/build.rb
361
362
  - lib/jekyll/commands/doctor.rb
@@ -392,6 +393,7 @@ files:
392
393
  - lib/jekyll/tags/highlight.rb
393
394
  - lib/jekyll/tags/include.rb
394
395
  - lib/jekyll/tags/post_url.rb
396
+ - lib/jekyll/url.rb
395
397
  - lib/site_template/.gitignore
396
398
  - lib/site_template/_config.yml
397
399
  - lib/site_template/_layouts/default.html
@@ -428,6 +430,7 @@ files:
428
430
  - site/_posts/2013-07-24-jekyll-1-1-1-released.markdown
429
431
  - site/_posts/2013-07-25-jekyll-1-0-4-released.markdown
430
432
  - site/_posts/2013-07-25-jekyll-1-1-2-released.markdown
433
+ - site/_posts/2013-09-06-jekyll-1-2-0-released.markdown
431
434
  - site/css/gridism.css
432
435
  - site/css/normalize.css
433
436
  - site/css/pygments.css
@@ -517,6 +520,7 @@ files:
517
520
  - test/source/_posts/2013-04-11-custom-excerpt.markdown
518
521
  - test/source/_posts/2013-05-10-number-category.textile
519
522
  - test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown
523
+ - test/source/_posts/2013-08-01-mkdn-extension.mkdn
520
524
  - test/source/_posts/es/2008-11-21-nested.textile
521
525
  - test/source/about.html
522
526
  - test/source/category/_posts/2008-9-23-categories.textile
@@ -550,6 +554,7 @@ files:
550
554
  - test/test_related_posts.rb
551
555
  - test/test_site.rb
552
556
  - test/test_tags.rb
557
+ - test/test_url.rb
553
558
  homepage: http://github.com/mojombo/jekyll
554
559
  licenses:
555
560
  - MIT
@@ -561,17 +566,17 @@ require_paths:
561
566
  - lib
562
567
  required_ruby_version: !ruby/object:Gem::Requirement
563
568
  requirements:
564
- - - ! '>='
569
+ - - '>='
565
570
  - !ruby/object:Gem::Version
566
571
  version: '0'
567
572
  required_rubygems_version: !ruby/object:Gem::Requirement
568
573
  requirements:
569
- - - ! '>='
574
+ - - '>='
570
575
  - !ruby/object:Gem::Version
571
576
  version: '0'
572
577
  requirements: []
573
578
  rubyforge_project: jekyll
574
- rubygems_version: 2.0.3
579
+ rubygems_version: 2.0.6
575
580
  signing_key:
576
581
  specification_version: 2
577
582
  summary: A simple, blog aware, static site generator.
@@ -594,3 +599,4 @@ test_files:
594
599
  - test/test_related_posts.rb
595
600
  - test/test_site.rb
596
601
  - test/test_tags.rb
602
+ - test/test_url.rb