nirvdrum-jekyll 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,48 @@
1
+ == Edge
2
+ * Bug Fixes
3
+ * Render highlighted code for non markdown/textile pages (#116)
4
+ * Expand source to full path so includes work anywhere (#101)
5
+ * Fix highlighting on Ruby 1.9 (#65)
6
+ * Fix extension munging when pretty permalinks are enabled (#64)
7
+ * Stop sorting categories (#33)
8
+
9
+ == 0.5.7 / 2010-01-12
10
+ * Minor Enhancements
11
+ * Allow overriding of post date in the front matter (#62, #38)
12
+ * Bug Fixes
13
+ * Categories isn't always an array (#73)
14
+ * Empty tags causes error in read_posts (#84)
15
+ * Fix pagination to adhere to read/render/write paradigm
16
+ * Test Enhancement
17
+ * cucumber features no longer use site.ports.first where a better alternative is available
18
+
19
+ == 0.5.6 / 2010-01-08
20
+ * Bug Fixes
21
+ * Require redcloth >= 4.2.1 in tests (#92)
22
+ * Don't break on triple dashes in yaml frontmatter (#93)
23
+ * Minor Enhancements
24
+ * Allow .mkd as markdown extension
25
+ * Use $stdout/err instead of constants (#99)
26
+ * Properly wrap code blocks (#91)
27
+ * Add javascript mime type for webrick (#98)
28
+
29
+ == 0.5.5 / 2010-01-08
30
+ * Bug Fixes
31
+ * Fix pagination % 0 bug (#78)
32
+ * Ensure all posts are processed first (#71)
33
+
34
+ == NOTE
35
+ * After this point I will no longer be giving credit in the history;
36
+ that is what the commit log is for.
37
+
38
+ == 0.5.4 / 2009-08-23
39
+ * Bug Fixes
40
+ * Do not allow symlinks (security vulnerability)
41
+
42
+ == 0.5.3 / 2009-07-14
43
+ * Bug Fixes
44
+ * Solving the permalink bug where non-html files wouldn't work [github.com/jeffrydegrande]
45
+
1
46
  == 0.5.2 / 2009-06-24
2
47
  * Enhancements
3
48
  * Added --paginate option to the executable along with a paginator object for the payload [github.com/calavera]
@@ -20,14 +20,21 @@ h2. Diving In
20
20
  * Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
21
21
  * Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
22
22
 
23
- h2. Dependencies
24
-
25
- * RedCloth: Textile support
26
- * Liquid: Templating system
27
- * Classifier: Generating related posts
28
- * Maruku: Default markdown engine
29
- * Directory Watcher: Auto-regeneration of sites
30
- * Open4: Talking to pygments for syntax highlighting
23
+ h2. Runtime Dependencies
24
+
25
+ * RedCloth: Textile support (Ruby)
26
+ * Liquid: Templating system (Ruby)
27
+ * Classifier: Generating related posts (Ruby)
28
+ * Maruku: Default markdown engine (Ruby)
29
+ * Directory Watcher: Auto-regeneration of sites (Ruby)
30
+ * Open4: Talking to pygments for syntax highlighting (Ruby)
31
+ * Pygments: Syntax highlighting (Python)
32
+
33
+ h2. Developer Dependencies
34
+
35
+ * Shoulda: Test framework (Ruby)
36
+ * RR: Mocking (Ruby)
37
+ * RedGreen: Nicer test output (Ruby)
31
38
 
32
39
  h2. License
33
40
 
data/Rakefile CHANGED
@@ -22,6 +22,7 @@ begin
22
22
  s.add_dependency('directory_watcher', '>= 1.1.1')
23
23
  s.add_dependency('open4', '>= 0.9.6')
24
24
  end
25
+ Jeweler::GemcutterTasks.new
25
26
  rescue LoadError
26
27
  puts "Jeweler not available. Install it with: sudo gem install jeweler --version '>= 0.11.0'"
27
28
  exit(1)
@@ -1,4 +1,5 @@
1
1
  ---
2
+ :minor: 7
3
+ :patch: 0
2
4
  :major: 0
3
- :minor: 6
4
- :patch: 1
5
+ :build:
data/bin/jekyll CHANGED
@@ -137,9 +137,13 @@ if options['server']
137
137
 
138
138
  FileUtils.mkdir_p(destination)
139
139
 
140
+ mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
141
+ mime_types.store 'js', 'application/javascript'
142
+
140
143
  s = HTTPServer.new(
141
144
  :Port => options['server_port'],
142
- :DocumentRoot => destination
145
+ :DocumentRoot => destination,
146
+ :MimeTypes => mime_types
143
147
  )
144
148
  t = Thread.new {
145
149
  s.start
@@ -29,7 +29,7 @@ Feature: Create sites
29
29
  Scenario: Basic site with layout and a post
30
30
  Given I have a _layouts directory
31
31
  And I have a _posts directory
32
- And I have the following post:
32
+ And I have the following posts:
33
33
  | title | date | layout | content |
34
34
  | Wargames | 3/27/2009 | default | The only winning move is not to play. |
35
35
  And I have a default layout that contains "Post Layout: {{ content }}"
@@ -37,6 +37,36 @@ Feature: Create sites
37
37
  Then the _site directory should exist
38
38
  And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
39
39
 
40
+ Scenario: Basic site with layouts, pages, posts and files
41
+ Given I have a _layouts directory
42
+ And I have a page layout that contains "Page Layout: {{ site.posts.size }}"
43
+ And I have a post layout that contains "Post Layout: {{ content }}"
44
+ And I have an "index.html" page with layout "page" that contains "site index page"
45
+ And I have a blog directory
46
+ And I have a "blog/index.html" page with layout "page" that contains "category index page"
47
+ And I have an "about.html" file that contains "No replacement {{ site.posts.size }}"
48
+ And I have an "another_file" file that contains ""
49
+ And I have a _posts directory
50
+ And I have the following posts:
51
+ | title | date | layout | content |
52
+ | entry1 | 3/27/2009 | post | content for entry1. |
53
+ | entry2 | 4/27/2009 | post | content for entry2. |
54
+ And I have a category/_posts directory
55
+ And I have the following posts in "category":
56
+ | title | date | layout | content |
57
+ | entry3 | 5/27/2009 | post | content for entry3. |
58
+ | entry4 | 6/27/2009 | post | content for entry4. |
59
+ When I run jekyll
60
+ Then the _site directory should exist
61
+ And I should see "Page Layout: 4" in "_site/index.html"
62
+ And I should see "No replacement \{\{ site.posts.size \}\}" in "_site/about.html"
63
+ And I should see "" in "_site/another_file"
64
+ And I should see "Page Layout: 4" in "_site/blog/index.html"
65
+ And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2009/03/27/entry1.html"
66
+ And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2009/04/27/entry2.html"
67
+ And I should see "Post Layout: <p>content for entry3.</p>" in "_site/category/2009/05/27/entry3.html"
68
+ And I should see "Post Layout: <p>content for entry4.</p>" in "_site/category/2009/06/27/entry4.html"
69
+
40
70
  Scenario: Basic site with include tag
41
71
  Given I have a _includes directory
42
72
  And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
@@ -57,4 +87,22 @@ Feature: Create sites
57
87
  And I have an "_stylesheets/simple.css" file that contains "div { width: 1 + 1 }"
58
88
  When I run jekyll
59
89
  Then the _site directory should exist
60
- And I should see "div { width: 1 + 1 }" in "_site/css/simple.css"
90
+ And I should see "div { width: 1 + 1 }" in "_site/css/simple.css"
91
+
92
+ Scenario: Basic site with subdir include tag
93
+ Given I have a _includes directory
94
+ And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
95
+ And I have an info directory
96
+ And I have an "info/index.html" page that contains "Basic Site with subdir include tag: {% include about.textile %}"
97
+ When I run jekyll
98
+ Then the _site directory should exist
99
+ And I should see "Basic Site with subdir include tag: Generated by Jekyll" in "_site/info/index.html"
100
+
101
+ Scenario: Basic site with nested include tag
102
+ Given I have a _includes directory
103
+ And I have an "_includes/about.textile" file that contains "Generated by {% include jekyll.textile %}"
104
+ And I have an "_includes/jekyll.textile" file that contains "Jekyll"
105
+ And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
106
+ When I run jekyll
107
+ Then the _site directory should exist
108
+ And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
@@ -20,7 +20,7 @@ Feature: Embed filters
20
20
  And I have the following post:
21
21
  | title | date | layout | content |
22
22
  | Star & Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
23
- And I have a default layout that contains "{{ site.posts.first.title | xml_escape }}"
23
+ And I have a default layout that contains "{{ page.title | xml_escape }}"
24
24
  When I run jekyll
25
25
  Then the _site directory should exist
26
26
  And I should see "Star &amp; Wars" in "_site/2009/03/27/star-wars.html"
@@ -31,7 +31,7 @@ Feature: Embed filters
31
31
  And I have the following post:
32
32
  | title | date | layout | content |
33
33
  | Star Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
34
- And I have a default layout that contains "{{ site.posts.first.content | xml_escape }}"
34
+ And I have a default layout that contains "{{ content | xml_escape }}"
35
35
  When I run jekyll
36
36
  Then the _site directory should exist
37
37
  And I should see "7" in "_site/2009/03/27/star-wars.html"
@@ -42,7 +42,7 @@ Feature: Embed filters
42
42
  And I have the following post:
43
43
  | title | date | layout | tags | content |
44
44
  | Star Wars | 3/27/2009 | default | [scifi, movies, force] | These aren't the droids you're looking for. |
45
- And I have a default layout that contains "{{ site.posts.first.tags | array_to_sentence_string }}"
45
+ And I have a default layout that contains "{{ page.tags | array_to_sentence_string }}"
46
46
  When I run jekyll
47
47
  Then the _site directory should exist
48
48
  And I should see "scifi, movies, and force" in "_site/2009/03/27/star-wars.html"
@@ -0,0 +1,30 @@
1
+ Feature: Markdown
2
+ As a hacker who likes to blog
3
+ I want to be able to make a static site
4
+ In order to share my awesome ideas with the interwebs
5
+
6
+ Scenario: Markdown in list on index
7
+ Given I have a configuration file with "paginate" set to "5"
8
+ And I have an "index.html" page that contains "Index - {% for post in site.posts %} {{ post.content }} {% endfor %}"
9
+ And I have a _posts directory
10
+ And I have the following post:
11
+ | title | date | content | type |
12
+ | Hackers | 3/27/2009 | # My Title | markdown |
13
+ When I run jekyll
14
+ Then the _site directory should exist
15
+ And I should see "Index" in "_site/index.html"
16
+ And I should see "<h1 id='my_title'>My Title</h1>" in "_site/2009/03/27/hackers.html"
17
+ And I should see "<h1 id='my_title'>My Title</h1>" in "_site/index.html"
18
+
19
+ Scenario: Markdown in pagination on index
20
+ Given I have a configuration file with "paginate" set to "5"
21
+ And I have an "index.html" page that contains "Index - {% for post in paginator.posts %} {{ post.content }} {% endfor %}"
22
+ And I have a _posts directory
23
+ And I have the following post:
24
+ | title | date | content | type |
25
+ | Hackers | 3/27/2009 | # My Title | markdown |
26
+ When I run jekyll
27
+ Then the _site directory should exist
28
+ And I should see "Index" in "_site/index.html"
29
+ And I should see "<h1 id='my_title'>My Title</h1>" in "_site/index.html"
30
+
@@ -6,35 +6,22 @@ Feature: Site pagination
6
6
  Scenario Outline: Paginate with N posts per page
7
7
  Given I have a configuration file with "paginate" set to "<num>"
8
8
  And I have a _layouts directory
9
- And I have an "index.html" file that contains "Basic Site"
9
+ And I have an "index.html" page that contains "{{ paginator.posts.size }}"
10
10
  And I have a _posts directory
11
11
  And I have the following post:
12
12
  | title | date | layout | content |
13
13
  | Wargames | 3/27/2009 | default | The only winning move is not to play. |
14
14
  | Wargames2 | 4/27/2009 | default | The only winning move is not to play2. |
15
- | Wargames3 | 5/27/2009 | default | The only winning move is not to play2. |
15
+ | Wargames3 | 5/27/2009 | default | The only winning move is not to play3. |
16
+ | Wargames4 | 6/27/2009 | default | The only winning move is not to play4. |
16
17
  When I run jekyll
17
- Then the _site/page2 directory should exist
18
- And the _site/page2/index.html file should exist
19
-
18
+ Then the _site/page<exist> directory should exist
19
+ And the "_site/page<exist>/index.html" file should exist
20
+ And I should see "<posts>" in "_site/page<exist>/index.html"
21
+ And the "_site/page<not_exist>/index.html" file should not exist
22
+
20
23
  Examples:
21
- | num |
22
- | 1 |
23
- | 2 |
24
-
25
- Scenario: Correct liquid paginator replacements
26
- Given I have a configuration file with "paginate" set to "1"
27
- And I have a _layouts directory
28
- And I have an "index.html" file that contains "{{ paginator.page }}"
29
- And I have a _posts directory
30
- And I have the following post:
31
- | title | date | layout | content |
32
- | Wargames | 3/27/2009 | default | The only winning move is not to play. |
33
- | Wargames2 | 4/27/2009 | default | The only winning move is not to play2. |
34
- When I run jekyll
35
- Then the _site/index.html file should exist
36
- And I should see "1" in "_site/index.html"
37
- Then the _site/page2 directory should exist
38
- And the _site/page2/index.html file should exist
39
- And I should see "2" in "_site/page2/index.html"
40
-
24
+ | num | exist | posts | not_exist |
25
+ | 1 | 4 | 1 | 5 |
26
+ | 2 | 2 | 2 | 3 |
27
+ | 3 | 2 | 1 | 3 |
@@ -9,7 +9,7 @@ Feature: Post data
9
9
  And I have the following post:
10
10
  | title | date | layout | content |
11
11
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
12
- And I have a simple layout that contains "Post title: {{ site.posts.first.title }}"
12
+ And I have a simple layout that contains "Post title: {{ page.title }}"
13
13
  When I run jekyll
14
14
  Then the _site directory should exist
15
15
  And I should see "Post title: Star Wars" in "_site/2009/03/27/star-wars.html"
@@ -20,7 +20,7 @@ Feature: Post data
20
20
  And I have the following post:
21
21
  | title | date | layout | content |
22
22
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
23
- And I have a simple layout that contains "Post url: {{ site.posts.first.url }}"
23
+ And I have a simple layout that contains "Post url: {{ page.url }}"
24
24
  When I run jekyll
25
25
  Then the _site directory should exist
26
26
  And I should see "Post url: /2009/03/27/star-wars.html" in "_site/2009/03/27/star-wars.html"
@@ -31,7 +31,7 @@ Feature: Post data
31
31
  And I have the following post:
32
32
  | title | date | layout | content |
33
33
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
34
- And I have a simple layout that contains "Post date: {{ site.posts.first.date }}"
34
+ And I have a simple layout that contains "Post date: {{ page.date }}"
35
35
  When I run jekyll
36
36
  Then the _site directory should exist
37
37
  And I should see "Post date: Fri Mar 27" in "_site/2009/03/27/star-wars.html"
@@ -42,7 +42,7 @@ Feature: Post data
42
42
  And I have the following post:
43
43
  | title | date | layout | content |
44
44
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
45
- And I have a simple layout that contains "Post id: {{ site.posts.first.id }}"
45
+ And I have a simple layout that contains "Post id: {{ page.id }}"
46
46
  When I run jekyll
47
47
  Then the _site directory should exist
48
48
  And I should see "Post id: /2009/03/27/star-wars" in "_site/2009/03/27/star-wars.html"
@@ -53,7 +53,7 @@ Feature: Post data
53
53
  And I have the following post:
54
54
  | title | date | layout | content |
55
55
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
56
- And I have a simple layout that contains "Post content: {{ site.posts.first.content }}"
56
+ And I have a simple layout that contains "Post content: {{ content }}"
57
57
  When I run jekyll
58
58
  Then the _site directory should exist
59
59
  And I should see "Post content: <p>Luke, I am your father.</p>" in "_site/2009/03/27/star-wars.html"
@@ -65,7 +65,7 @@ Feature: Post data
65
65
  And I have the following post in "movies":
66
66
  | title | date | layout | content |
67
67
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
68
- And I have a simple layout that contains "Post category: {{ site.posts.first.categories }}"
68
+ And I have a simple layout that contains "Post category: {{ page.categories }}"
69
69
  When I run jekyll
70
70
  Then the _site directory should exist
71
71
  And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
@@ -76,23 +76,23 @@ Feature: Post data
76
76
  And I have the following post:
77
77
  | title | date | layout | tag | content |
78
78
  | Star Wars | 5/18/2009 | simple | twist | Luke, I am your father. |
79
- And I have a simple layout that contains "Post tags: {{ site.posts.first.tags }}"
79
+ And I have a simple layout that contains "Post tags: {{ page.tags }}"
80
80
  When I run jekyll
81
81
  Then the _site directory should exist
82
82
  And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html"
83
83
 
84
84
  Scenario: Use post.categories variable when categories are in folders
85
- Given I have a movies directory
86
- And I have a movies/scifi directory
87
- And I have a movies/scifi/_posts directory
85
+ Given I have a scifi directory
86
+ And I have a scifi/movies directory
87
+ And I have a scifi/movies/_posts directory
88
88
  And I have a _layouts directory
89
- And I have the following post in "movies/scifi":
89
+ And I have the following post in "scifi/movies":
90
90
  | title | date | layout | content |
91
91
  | Star Wars | 3/27/2009 | simple | Luke, I am your father. |
92
- And I have a simple layout that contains "Post categories: {{ site.posts.first.categories | array_to_sentence_string }}"
92
+ And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
93
93
  When I run jekyll
94
94
  Then the _site directory should exist
95
- And I should see "Post categories: movies and scifi" in "_site/movies/scifi/2009/03/27/star-wars.html"
95
+ And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
96
96
 
97
97
  Scenario: Use post.categories variable when category is in YAML
98
98
  Given I have a _posts directory
@@ -100,7 +100,7 @@ Feature: Post data
100
100
  And I have the following post:
101
101
  | title | date | layout | category | content |
102
102
  | Star Wars | 3/27/2009 | simple | movies | Luke, I am your father. |
103
- And I have a simple layout that contains "Post category: {{ site.posts.first.categories }}"
103
+ And I have a simple layout that contains "Post category: {{ page.categories }}"
104
104
  When I run jekyll
105
105
  Then the _site directory should exist
106
106
  And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
@@ -110,11 +110,11 @@ Feature: Post data
110
110
  And I have a _layouts directory
111
111
  And I have the following post:
112
112
  | title | date | layout | categories | content |
113
- | Star Wars | 3/27/2009 | simple | ['movies', 'scifi'] | Luke, I am your father. |
114
- And I have a simple layout that contains "Post categories: {{ site.posts.first.categories | array_to_sentence_string }}"
113
+ | Star Wars | 3/27/2009 | simple | ['scifi', 'movies'] | Luke, I am your father. |
114
+ And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
115
115
  When I run jekyll
116
116
  Then the _site directory should exist
117
- And I should see "Post categories: movies and scifi" in "_site/movies/scifi/2009/03/27/star-wars.html"
117
+ And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
118
118
 
119
119
  Scenario: Disable a post from being published
120
120
  Given I have a _posts directory
@@ -133,7 +133,7 @@ Feature: Post data
133
133
  And I have the following post:
134
134
  | title | date | layout | author | content |
135
135
  | Star Wars | 3/27/2009 | simple | Darth Vader | Luke, I am your father. |
136
- And I have a simple layout that contains "Post author: {{ site.posts.first.author }}"
136
+ And I have a simple layout that contains "Post author: {{ page.author }}"
137
137
  When I run jekyll
138
138
  Then the _site directory should exist
139
139
  And I should see "Post author: Darth Vader" in "_site/2009/03/27/star-wars.html"
@@ -13,7 +13,7 @@ Given /^I have a blank site in "(.*)"$/ do |path|
13
13
  end
14
14
 
15
15
  # Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it
16
- Given /^I have an "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$/ do |file, key, value, text|
16
+ Given /^I have an? "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$/ do |file, key, value, text|
17
17
  File.open(file, 'w') do |f|
18
18
  f.write <<EOF
19
19
  ---
@@ -25,7 +25,7 @@ EOF
25
25
  end
26
26
  end
27
27
 
28
- Given /^I have an "(.*)" file that contains "(.*)"$/ do |file, text|
28
+ Given /^I have an? "(.*)" file that contains "(.*)"$/ do |file, text|
29
29
  File.open(file, 'w') do |f|
30
30
  f.write(text)
31
31
  f.close
@@ -39,8 +39,8 @@ Given /^I have a (.*) layout that contains "(.*)"$/ do |layout, text|
39
39
  end
40
40
  end
41
41
 
42
- Given /^I have a (.*) directory$/ do |dir|
43
- FileUtils.mkdir(dir)
42
+ Given /^I have an? (.*) directory$/ do |dir|
43
+ FileUtils.mkdir_p(dir)
44
44
  end
45
45
 
46
46
  Given /^I have the following posts?(?: (.*) "(.*)")?:$/ do |direction, folder, table|
@@ -115,14 +115,14 @@ Then /^the (.*) directory should exist$/ do |dir|
115
115
  assert File.directory?(dir)
116
116
  end
117
117
 
118
- Then /^the (.*) file should exist$/ do |file|
119
- assert File.file?(file)
120
- end
121
-
122
118
  Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
123
119
  assert_match Regexp.new(Regexp.escape(text)), File.open(file).readlines.join
124
120
  end
125
121
 
122
+ Then /^the "(.*)" file should exist$/ do |file|
123
+ assert File.file?(file)
124
+ end
125
+
126
126
  Then /^the "(.*)" file should not exist$/ do |file|
127
127
  assert !File.exists?(file)
128
128
  end