jekyll 1.0.4 → 1.1.1

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 (90) hide show
  1. checksums.yaml +14 -6
  2. data/{CONTRIBUTING.md → CONTRIBUTING.markdown} +19 -1
  3. data/History.markdown +172 -85
  4. data/README.markdown +45 -0
  5. data/Rakefile +43 -18
  6. data/bin/jekyll +31 -1
  7. data/features/create_sites.feature +18 -0
  8. data/features/include_tag.feature +35 -0
  9. data/features/pagination.feature +28 -0
  10. data/features/post_excerpts.feature +50 -0
  11. data/features/step_definitions/jekyll_steps.rb +27 -11
  12. data/features/support/env.rb +9 -0
  13. data/jekyll.gemspec +32 -7
  14. data/lib/jekyll.rb +2 -1
  15. data/lib/jekyll/commands/new.rb +15 -3
  16. data/lib/jekyll/configuration.rb +23 -22
  17. data/lib/jekyll/converters/markdown/kramdown_parser.rb +4 -15
  18. data/lib/jekyll/convertible.rb +4 -0
  19. data/lib/jekyll/core_ext.rb +11 -0
  20. data/lib/jekyll/excerpt.rb +113 -0
  21. data/lib/jekyll/generators/pagination.rb +93 -23
  22. data/lib/jekyll/page.rb +1 -3
  23. data/lib/jekyll/post.rb +15 -55
  24. data/lib/jekyll/related_posts.rb +2 -1
  25. data/lib/jekyll/site.rb +33 -41
  26. data/lib/jekyll/stevenson.rb +25 -4
  27. data/lib/jekyll/tags/include.rb +46 -2
  28. data/lib/site_template/_config.yml +1 -0
  29. data/lib/site_template/css/main.css +0 -5
  30. data/site/_config.yml +1 -0
  31. data/site/_includes/docs_contents.html +12 -3
  32. data/site/_includes/docs_contents_mobile.html +7 -1
  33. data/site/_includes/news_contents.html +23 -0
  34. data/site/_includes/news_contents_mobile.html +11 -0
  35. data/site/_includes/news_item.html +24 -0
  36. data/site/_includes/primary-nav-items.html +4 -1
  37. data/site/_includes/top.html +2 -0
  38. data/site/_layouts/news.html +19 -0
  39. data/site/_layouts/news_item.html +27 -0
  40. data/site/_posts/2013-05-06-jekyll-1-0-0-released.markdown +23 -0
  41. data/site/_posts/2013-05-08-jekyll-1-0-1-released.markdown +27 -0
  42. data/site/_posts/2013-05-12-jekyll-1-0-2-released.markdown +28 -0
  43. data/site/_posts/2013-06-07-jekyll-1-0-3-released.markdown +25 -0
  44. data/site/_posts/2013-07-14-jekyll-1-1-0-released.markdown +27 -0
  45. data/site/_posts/2013-07-24-jekyll-1-1-1-released.markdown +31 -0
  46. data/site/css/style.css +125 -17
  47. data/site/docs/configuration.md +10 -1
  48. data/site/docs/contributing.md +21 -3
  49. data/site/docs/deployment-methods.md +2 -2
  50. data/site/docs/drafts.md +20 -0
  51. data/site/docs/extras.md +24 -3
  52. data/site/docs/github-pages.md +25 -0
  53. data/site/docs/history.md +150 -85
  54. data/site/docs/index.md +1 -17
  55. data/site/docs/installation.md +3 -2
  56. data/site/docs/migrations.md +2 -2
  57. data/site/docs/pagination.md +12 -0
  58. data/site/docs/plugins.md +97 -76
  59. data/site/docs/quickstart.md +32 -0
  60. data/site/docs/resources.md +0 -1
  61. data/site/docs/structure.md +15 -0
  62. data/site/docs/templates.md +26 -4
  63. data/site/docs/troubleshooting.md +22 -7
  64. data/site/docs/upgrading.md +6 -1
  65. data/site/docs/variables.md +12 -2
  66. data/site/feed.xml +36 -0
  67. data/site/freenode.txt +1 -0
  68. data/site/img/article-footer.png +0 -0
  69. data/site/img/footer-arrow.png +0 -0
  70. data/site/img/footer-logo.png +0 -0
  71. data/site/img/logo-2x.png +0 -0
  72. data/site/img/octojekyll.png +0 -0
  73. data/site/img/tube.png +0 -0
  74. data/site/img/tube1x.png +0 -0
  75. data/site/index.html +1 -1
  76. data/site/news/index.md +10 -0
  77. data/site/news/releases/index.md +10 -0
  78. data/test/source/+/foo.md +7 -0
  79. data/test/source/_includes/params.html +7 -0
  80. data/test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown +23 -0
  81. data/test/test_configuration.rb +9 -0
  82. data/test/test_excerpt.rb +62 -0
  83. data/test/test_generated_site.rb +1 -1
  84. data/test/test_page.rb +9 -0
  85. data/test/test_pager.rb +31 -37
  86. data/test/test_post.rb +2 -1
  87. data/test/test_related_posts.rb +6 -1
  88. data/test/test_tags.rb +90 -0
  89. metadata +62 -23
  90. data/README.textile +0 -45
@@ -13,7 +13,12 @@ class TestRelatedPosts < Test::Unit::TestCase
13
13
  should "use the most recent posts for related posts" do
14
14
  @site.reset
15
15
  @site.read
16
- assert_equal @site.posts[0..9], Jekyll::RelatedPosts.new(@site.posts.last).build
16
+
17
+ last_post = @site.posts.last
18
+ related_posts = Jekyll::RelatedPosts.new(last_post).build
19
+
20
+ last_10_recent_posts = (@site.posts.reverse - [last_post]).first(10)
21
+ assert_equal last_10_recent_posts, related_posts
17
22
  end
18
23
  end
19
24
 
@@ -347,4 +347,94 @@ CONTENT
347
347
  end
348
348
  end
349
349
  end
350
+
351
+ context "include tag with parameters" do
352
+ context "with one parameter" do
353
+ setup do
354
+ content = <<CONTENT
355
+ ---
356
+ title: Include tag parameters
357
+ ---
358
+
359
+ {% include sig.markdown myparam="test" %}
360
+
361
+ {% include params.html param="value" %}
362
+ CONTENT
363
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
364
+ end
365
+
366
+ should "correctly output include variable" do
367
+ assert_match "<span id='include-param'>value</span>", @result.strip
368
+ end
369
+
370
+ should "ignore parameters if unused" do
371
+ assert_match "<hr />\n<p>Tom Preston-Werner github.com/mojombo</p>\n", @result
372
+ end
373
+ end
374
+
375
+ context "with invalid parameter syntax" do
376
+ should "throw a SyntaxError" do
377
+ content = <<CONTENT
378
+ ---
379
+ title: Invalid parameter syntax
380
+ ---
381
+
382
+ {% include params.html param s="value" %}
383
+ CONTENT
384
+ assert_raise SyntaxError, 'Did not raise exception on invalid "include" syntax' do
385
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
386
+ end
387
+
388
+ content = <<CONTENT
389
+ ---
390
+ title: Invalid parameter syntax
391
+ ---
392
+
393
+ {% include params.html params="value %}
394
+ CONTENT
395
+ assert_raise SyntaxError, 'Did not raise exception on invalid "include" syntax' do
396
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
397
+ end
398
+ end
399
+ end
400
+
401
+ context "with several parameters" do
402
+ setup do
403
+ content = <<CONTENT
404
+ ---
405
+ title: multiple include parameters
406
+ ---
407
+
408
+ {% include params.html param1="new_value" param2="another" %}
409
+ CONTENT
410
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
411
+ end
412
+
413
+ should "list all parameters" do
414
+ assert_match '<li>param1 = new_value</li>', @result
415
+ assert_match '<li>param2 = another</li>', @result
416
+ end
417
+
418
+ should "not include previously used parameters" do
419
+ assert_match "<span id='include-param' />", @result
420
+ end
421
+ end
422
+
423
+ context "without parameters" do
424
+ setup do
425
+ content = <<CONTENT
426
+ ---
427
+ title: without parameters
428
+ ---
429
+
430
+ {% include params.html %}
431
+ CONTENT
432
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
433
+ end
434
+
435
+ should "include file with empty parameters" do
436
+ assert_match "<span id='include-param' />", @result
437
+ end
438
+ end
439
+ end
350
440
  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.0.4
4
+ version: 1.1.1
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-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.5.1
19
+ version: '2.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 2.5.1
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: classifier
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: redcarpet
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ~>
144
+ - !ruby/object:Gem::Version
145
+ version: 2.2.2
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ version: 2.2.2
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rake
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -213,7 +227,7 @@ dependencies:
213
227
  - - ~>
214
228
  - !ruby/object:Gem::Version
215
229
  version: 1.2.1
216
- - - '!='
230
+ - - ! '!='
217
231
  - !ruby/object:Gem::Version
218
232
  version: 1.2.4
219
233
  type: :development
@@ -223,7 +237,7 @@ dependencies:
223
237
  - - ~>
224
238
  - !ruby/object:Gem::Version
225
239
  version: 1.2.1
226
- - - '!='
240
+ - - ! '!='
227
241
  - !ruby/object:Gem::Version
228
242
  version: 1.2.4
229
243
  - !ruby/object:Gem::Dependency
@@ -255,85 +269,87 @@ dependencies:
255
269
  - !ruby/object:Gem::Version
256
270
  version: '1.6'
257
271
  - !ruby/object:Gem::Dependency
258
- name: redcarpet
272
+ name: launchy
259
273
  requirement: !ruby/object:Gem::Requirement
260
274
  requirements:
261
275
  - - ~>
262
276
  - !ruby/object:Gem::Version
263
- version: 2.2.2
277
+ version: 2.1.2
264
278
  type: :development
265
279
  prerelease: false
266
280
  version_requirements: !ruby/object:Gem::Requirement
267
281
  requirements:
268
282
  - - ~>
269
283
  - !ruby/object:Gem::Version
270
- version: 2.2.2
284
+ version: 2.1.2
271
285
  - !ruby/object:Gem::Dependency
272
- name: launchy
286
+ name: simplecov
273
287
  requirement: !ruby/object:Gem::Requirement
274
288
  requirements:
275
289
  - - ~>
276
290
  - !ruby/object:Gem::Version
277
- version: 2.1.2
291
+ version: '0.7'
278
292
  type: :development
279
293
  prerelease: false
280
294
  version_requirements: !ruby/object:Gem::Requirement
281
295
  requirements:
282
296
  - - ~>
283
297
  - !ruby/object:Gem::Version
284
- version: 2.1.2
298
+ version: '0.7'
285
299
  - !ruby/object:Gem::Dependency
286
- name: simplecov
300
+ name: simplecov-gem-adapter
287
301
  requirement: !ruby/object:Gem::Requirement
288
302
  requirements:
289
303
  - - ~>
290
304
  - !ruby/object:Gem::Version
291
- version: '0.7'
305
+ version: 1.0.1
292
306
  type: :development
293
307
  prerelease: false
294
308
  version_requirements: !ruby/object:Gem::Requirement
295
309
  requirements:
296
310
  - - ~>
297
311
  - !ruby/object:Gem::Version
298
- version: '0.7'
312
+ version: 1.0.1
299
313
  - !ruby/object:Gem::Dependency
300
- name: simplecov-gem-adapter
314
+ name: activesupport
301
315
  requirement: !ruby/object:Gem::Requirement
302
316
  requirements:
303
317
  - - ~>
304
318
  - !ruby/object:Gem::Version
305
- version: 1.0.1
319
+ version: 3.2.13
306
320
  type: :development
307
321
  prerelease: false
308
322
  version_requirements: !ruby/object:Gem::Requirement
309
323
  requirements:
310
324
  - - ~>
311
325
  - !ruby/object:Gem::Version
312
- version: 1.0.1
326
+ version: 3.2.13
313
327
  description: Jekyll is a simple, blog aware, static site generator.
314
328
  email: tom@mojombo.com
315
329
  executables:
316
330
  - jekyll
317
331
  extensions: []
318
332
  extra_rdoc_files:
319
- - README.textile
333
+ - README.markdown
320
334
  - LICENSE
321
335
  files:
322
- - CONTRIBUTING.md
336
+ - CONTRIBUTING.markdown
323
337
  - Gemfile
324
338
  - History.markdown
325
339
  - LICENSE
326
- - README.textile
340
+ - README.markdown
327
341
  - Rakefile
328
342
  - bin/jekyll
329
343
  - cucumber.yml
330
344
  - features/create_sites.feature
331
345
  - features/drafts.feature
332
346
  - features/embed_filters.feature
347
+ - features/include_tag.feature
333
348
  - features/markdown.feature
334
349
  - features/pagination.feature
335
350
  - features/permalinks.feature
336
351
  - features/post_data.feature
352
+ - features/post_excerpts.feature
337
353
  - features/site_configuration.feature
338
354
  - features/site_data.feature
339
355
  - features/step_definitions/jekyll_steps.rb
@@ -359,6 +375,7 @@ files:
359
375
  - lib/jekyll/deprecator.rb
360
376
  - lib/jekyll/draft.rb
361
377
  - lib/jekyll/errors.rb
378
+ - lib/jekyll/excerpt.rb
362
379
  - lib/jekyll/filters.rb
363
380
  - lib/jekyll/generator.rb
364
381
  - lib/jekyll/generators/pagination.rb
@@ -393,11 +410,22 @@ files:
393
410
  - site/_includes/docs_contents_mobile.html
394
411
  - site/_includes/footer.html
395
412
  - site/_includes/header.html
413
+ - site/_includes/news_contents.html
414
+ - site/_includes/news_contents_mobile.html
415
+ - site/_includes/news_item.html
396
416
  - site/_includes/primary-nav-items.html
397
417
  - site/_includes/section_nav.html
398
418
  - site/_includes/top.html
399
419
  - site/_layouts/default.html
400
420
  - site/_layouts/docs.html
421
+ - site/_layouts/news.html
422
+ - site/_layouts/news_item.html
423
+ - site/_posts/2013-05-06-jekyll-1-0-0-released.markdown
424
+ - site/_posts/2013-05-08-jekyll-1-0-1-released.markdown
425
+ - site/_posts/2013-05-12-jekyll-1-0-2-released.markdown
426
+ - site/_posts/2013-06-07-jekyll-1-0-3-released.markdown
427
+ - site/_posts/2013-07-14-jekyll-1-1-0-released.markdown
428
+ - site/_posts/2013-07-24-jekyll-1-1-1-released.markdown
401
429
  - site/css/gridism.css
402
430
  - site/css/normalize.css
403
431
  - site/css/pygments.css
@@ -405,6 +433,7 @@ files:
405
433
  - site/docs/configuration.md
406
434
  - site/docs/contributing.md
407
435
  - site/docs/deployment-methods.md
436
+ - site/docs/drafts.md
408
437
  - site/docs/extras.md
409
438
  - site/docs/frontmatter.md
410
439
  - site/docs/github-pages.md
@@ -418,6 +447,7 @@ files:
418
447
  - site/docs/permalinks.md
419
448
  - site/docs/plugins.md
420
449
  - site/docs/posts.md
450
+ - site/docs/quickstart.md
421
451
  - site/docs/resources.md
422
452
  - site/docs/sites.md
423
453
  - site/docs/structure.md
@@ -427,6 +457,8 @@ files:
427
457
  - site/docs/usage.md
428
458
  - site/docs/variables.md
429
459
  - site/favicon.png
460
+ - site/feed.xml
461
+ - site/freenode.txt
430
462
  - site/img/article-footer.png
431
463
  - site/img/footer-arrow.png
432
464
  - site/img/footer-logo.png
@@ -436,13 +468,17 @@ files:
436
468
  - site/img/tube1x.png
437
469
  - site/index.html
438
470
  - site/js/modernizr-2.5.3.min.js
471
+ - site/news/index.md
472
+ - site/news/releases/index.md
439
473
  - test/fixtures/broken_front_matter1.erb
440
474
  - test/fixtures/broken_front_matter2.erb
441
475
  - test/fixtures/broken_front_matter3.erb
442
476
  - test/fixtures/exploit_front_matter.erb
443
477
  - test/fixtures/front_matter.erb
444
478
  - test/helper.rb
479
+ - test/source/+/foo.md
445
480
  - test/source/.htaccess
481
+ - test/source/_includes/params.html
446
482
  - test/source/_includes/sig.markdown
447
483
  - test/source/_layouts/default.html
448
484
  - test/source/_layouts/simple.html
@@ -478,6 +514,7 @@ files:
478
514
  - test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
479
515
  - test/source/_posts/2013-04-11-custom-excerpt.markdown
480
516
  - test/source/_posts/2013-05-10-number-category.textile
517
+ - test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown
481
518
  - test/source/_posts/es/2008-11-21-nested.textile
482
519
  - test/source/about.html
483
520
  - test/source/category/_posts/2008-9-23-categories.textile
@@ -497,6 +534,7 @@ files:
497
534
  - test/test_configuration.rb
498
535
  - test/test_convertible.rb
499
536
  - test/test_core_ext.rb
537
+ - test/test_excerpt.rb
500
538
  - test/test_filters.rb
501
539
  - test/test_generated_site.rb
502
540
  - test/test_kramdown.rb
@@ -521,12 +559,12 @@ require_paths:
521
559
  - lib
522
560
  required_ruby_version: !ruby/object:Gem::Requirement
523
561
  requirements:
524
- - - '>='
562
+ - - ! '>='
525
563
  - !ruby/object:Gem::Version
526
564
  version: '0'
527
565
  required_rubygems_version: !ruby/object:Gem::Requirement
528
566
  requirements:
529
- - - '>='
567
+ - - ! '>='
530
568
  - !ruby/object:Gem::Version
531
569
  version: '0'
532
570
  requirements: []
@@ -540,6 +578,7 @@ test_files:
540
578
  - test/test_configuration.rb
541
579
  - test/test_convertible.rb
542
580
  - test/test_core_ext.rb
581
+ - test/test_excerpt.rb
543
582
  - test/test_filters.rb
544
583
  - test/test_generated_site.rb
545
584
  - test/test_kramdown.rb
@@ -1,45 +0,0 @@
1
- h1. Jekyll
2
-
3
- !https://travis-ci.org/mojombo/jekyll.png?branch=master!:https://travis-ci.org/mojombo/jekyll
4
- "!https://codeclimate.com/github/mojombo/jekyll.png!":https://codeclimate.com/github/mojombo/jekyll
5
-
6
- By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
7
-
8
- Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind "GitHub Pages":http://pages.github.com, which you can use to host your project's page or blog right here from GitHub.
9
-
10
- h2. Getting Started
11
-
12
- * "Install":http://jekyllrb.com/docs/installation/ the gem
13
- * Read up about its "Usage":http://jekyllrb.com/docs/usage/ and "Configuration":http://jekyllrb.com/docs/configuration/
14
- * Take a gander at some existing "Sites":http://wiki.github.com/mojombo/jekyll/sites
15
- * Fork and "Contribute":https://github.com/mojombo/jekyll/blob/master/CONTRIBUTING.md your own modifications
16
- * Have questions? Post them on the "Mailing List":http://groups.google.com/group/jekyll-rb
17
-
18
- h2. Diving In
19
-
20
- * "Migrate":http://jekyllrb.com/docs/migrations/ from your previous system
21
- * Learn how the "YAML Front Matter":http://jekyllrb.com/docs/frontmatter/ works
22
- * Put information on your site with "Variables":http://jekyllrb.com/docs/variables/
23
- * Customize the "Permalinks":http://jekyllrb.com/docs/permalinks/ your posts are generated with
24
- * Use the built-in "Liquid Extensions":http://jekyllrb.com/docs/templates/ to make your life easier
25
- * Use custom "Plugins":http://jekyllrb.com/docs/plugins/ to generate content specific to your site
26
-
27
- h2. Runtime Dependencies
28
-
29
- * Classifier: Generating related posts (Ruby)
30
- * Directory Watcher: Auto-regeneration of sites (Ruby)
31
- * Kramdown: Markdown-superset converter (Ruby)
32
- * Liquid: Templating system (Ruby)
33
- * Maruku: Default markdown engine (Ruby)
34
-
35
- h2. Developer Dependencies
36
-
37
- * RDiscount: Discount Markdown Processor (Ruby)
38
- * RedCloth: Textile support (Ruby)
39
- * RedGreen: Nicer test output (Ruby)
40
- * RR: Mocking (Ruby)
41
- * Shoulda: Test framework (Ruby)
42
-
43
- h2. License
44
-
45
- See "LICENSE":https://github.com/mojombo/jekyll/blob/master/LICENSE.