jekyll 1.0.2 → 1.0.3
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 +8 -8
- data/History.markdown +46 -0
- data/Rakefile +35 -1
- data/bin/jekyll +6 -4
- data/features/create_sites.feature +8 -8
- data/features/drafts.feature +3 -3
- data/features/embed_filters.feature +5 -5
- data/features/markdown.feature +2 -2
- data/features/pagination.feature +8 -8
- data/features/permalinks.feature +5 -5
- data/features/post_data.feature +23 -23
- data/features/site_configuration.feature +9 -9
- data/features/site_data.feature +14 -14
- data/features/step_definitions/jekyll_steps.rb +16 -27
- data/features/support/env.rb +11 -6
- data/jekyll.gemspec +7 -4
- data/lib/jekyll.rb +7 -2
- data/lib/jekyll/command.rb +3 -3
- data/lib/jekyll/commands/build.rb +5 -5
- data/lib/jekyll/commands/doctor.rb +2 -2
- data/lib/jekyll/commands/new.rb +8 -3
- data/lib/jekyll/configuration.rb +31 -6
- data/lib/jekyll/converters/markdown/maruku_parser.rb +11 -7
- data/lib/jekyll/convertible.rb +4 -7
- data/lib/jekyll/deprecator.rb +2 -2
- data/lib/jekyll/filters.rb +12 -2
- data/lib/jekyll/generators/pagination.rb +3 -2
- data/lib/jekyll/layout.rb +3 -0
- data/lib/jekyll/post.rb +1 -23
- data/lib/jekyll/related_posts.rb +58 -0
- data/lib/jekyll/site.rb +2 -4
- data/lib/jekyll/{logger.rb → stevenson.rb} +26 -12
- data/lib/jekyll/tags/gist.rb +13 -3
- data/lib/site_template/_layouts/default.html +1 -1
- data/lib/site_template/_layouts/post.html +1 -1
- data/lib/site_template/css/main.css +7 -7
- data/site/_includes/docs_contents.html +3 -0
- data/site/css/pygments.css +1 -1
- data/site/css/style.css +9 -2
- data/site/docs/deployment-methods.md +1 -1
- data/site/docs/frontmatter.md +10 -0
- data/site/docs/history.md +536 -0
- data/site/docs/installation.md +2 -4
- data/site/docs/migrations.md +57 -58
- data/site/docs/plugins.md +3 -0
- data/site/docs/posts.md +24 -2
- data/site/docs/templates.md +50 -3
- data/site/docs/upgrading.md +45 -29
- data/test/source/_layouts/default.html +1 -1
- data/test/test_configuration.rb +15 -3
- data/test/test_page.rb +1 -1
- data/test/test_pager.rb +7 -0
- data/test/test_post.rb +11 -11
- data/test/test_redcloth.rb +3 -3
- data/test/test_related_posts.rb +41 -0
- data/test/test_site.rb +6 -6
- data/test/test_tags.rb +40 -0
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjY5NjZlNWI3NWYxNWNlMDBmNTc4YTY4YmFjNWVjOWM4ODI4YmZlOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjQ1ZjA3NTJjYzEyZDUyN2YwODlkYTdiZmQ4MDYwMGQ3MDYwOTg2NA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDYxODZkZWI0N2MxZGJmNzI3YzY3ZTc1NzNhMGVkMWRiOTA4MGY4N2QzMTk2
|
10
|
+
M2E5OGU3NGE5M2Q2NzAxNjMwNTVmYjUwNjAzNTFlM2NiODYwZTQyMTYyNTJi
|
11
|
+
YTVjYTk2MzgzYWJkMmEwMGMyNDMwMTRjODRkNGM3OTA4MjRiMWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDcyYjIyOGI1YjVkOWFmZjk3M2Q0ZmQyYzBiYjUwYThjZjEyMWMzNGM3ZGNh
|
14
|
+
NTA5M2Q1ZjdiNGU2MmQ3MWFlOTAyYmE4MzY1NmM0ZTZhMTBiODM4OTllMzRk
|
15
|
+
YjIzNDY1NDA2MThjOWQ1YzU0MTlmMThiNTFhZmRhN2NjNWM4NmU=
|
data/History.markdown
CHANGED
@@ -1,10 +1,56 @@
|
|
1
1
|
## HEAD
|
2
|
+
|
2
3
|
### Major Enhancements
|
3
4
|
### Minor Enhancements
|
4
5
|
### Bug Fixes
|
5
6
|
### Site Enhancements
|
6
7
|
### Development Fixes
|
7
8
|
|
9
|
+
## 1.0.3 / 2013-06-07
|
10
|
+
|
11
|
+
### Minor Enhancements
|
12
|
+
* Add support to gist tag for private gists. (#1189)
|
13
|
+
* Fail loudly when MaRuKu errors out (#1190)
|
14
|
+
* Move the building of related posts into their own class (#1057)
|
15
|
+
* Removed trailing spaces in several places throughout the code (#1116)
|
16
|
+
* Add a `--force` option to `jekyll new` (#1115)
|
17
|
+
* Convert IDs in the site template to classes (#1170)
|
18
|
+
|
19
|
+
### Bug Fixes
|
20
|
+
* Fix typo in Stevenson constant "ERROR". (#1166)
|
21
|
+
* Rename Jekyll::Logger to Jekyll::Stevenson to fix inheritance issue (#1106)
|
22
|
+
* Exit with a non-zero exit code when dealing with a Liquid error (#1121)
|
23
|
+
* Make the `exclude` and `include` options backwards compatible with
|
24
|
+
versions of Jekyll prior to 1.0 (#1114)
|
25
|
+
* Fix pagination on Windows (#1063)
|
26
|
+
* Fix the application of Pygments' Generic Output style to Go code
|
27
|
+
(#1156)
|
28
|
+
|
29
|
+
### Site Enhancements
|
30
|
+
* Add a Pro Tip to docs about front matter variables being optional (#1147)
|
31
|
+
* Add changelog to site as History page in /docs/ (#1065)
|
32
|
+
* Add note to Upgrading page about new config options in 1.0.x (#1146)
|
33
|
+
* Documentation for `date_to_rfc822` and `uri_escape` (#1142)
|
34
|
+
* Documentation highlight boxes shouldn't show scrollbars if not necessary (#1123)
|
35
|
+
* Add link to jekyll-minibundle in the doc's plugins list (#1035)
|
36
|
+
* Quick patch for importers documentation
|
37
|
+
* Fix prefix for WordpressDotCom importer in docs (#1107)
|
38
|
+
* Add jekyll-contentblocks plugin to docs (#1068)
|
39
|
+
* Make code bits in notes look more natural, more readable (#1089)
|
40
|
+
* Fix logic for `relative_permalinks` instructions on Upgrading page (#1101)
|
41
|
+
* Add docs for post excerpt (#1072)
|
42
|
+
* Add docs for gist tag (#1072)
|
43
|
+
* Add docs indicating that Pygments does not need to be installed
|
44
|
+
separately (#1099, #1119)
|
45
|
+
* Update the migrator docs to be current (#1136)
|
46
|
+
* Add the Jekyll Gallery Plugin to the plugin list (#1143)
|
47
|
+
|
48
|
+
### Development Fixes
|
49
|
+
* Use Jekyll.logger instead of Jekyll::Stevenson to log things (#1149)
|
50
|
+
* Fix pesky Cucumber infinite loop (#1139)
|
51
|
+
* Do not write posts with timezones in Cucumber tests (#1124)
|
52
|
+
* Use ISO formatted dates in Cucumber features (#1150)
|
53
|
+
|
8
54
|
## 1.0.2 / 2013-05-12
|
9
55
|
|
10
56
|
### Major Enhancements
|
data/Rakefile
CHANGED
@@ -24,6 +24,10 @@ def date
|
|
24
24
|
Date.today.to_s
|
25
25
|
end
|
26
26
|
|
27
|
+
def file_date
|
28
|
+
Date.today.strftime("%F")
|
29
|
+
end
|
30
|
+
|
27
31
|
def rubyforge_project
|
28
32
|
name
|
29
33
|
end
|
@@ -110,7 +114,7 @@ namespace :site do
|
|
110
114
|
end
|
111
115
|
|
112
116
|
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
|
113
|
-
task :publish do
|
117
|
+
task :publish => [:history] do
|
114
118
|
# Ensure the gh-pages dir exists so we can generate into it.
|
115
119
|
puts "Checking for gh-pages dir..."
|
116
120
|
unless File.exist?("./gh-pages")
|
@@ -143,6 +147,36 @@ namespace :site do
|
|
143
147
|
end
|
144
148
|
puts 'Done.'
|
145
149
|
end
|
150
|
+
|
151
|
+
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
|
152
|
+
task :history do
|
153
|
+
# First lets go ahead and format the file correctly (mainly bullet points)
|
154
|
+
puts "Generating the History doc"
|
155
|
+
# Checking to make sure the History file exists in the root of the repo
|
156
|
+
if File.exist?("History.markdown")
|
157
|
+
# Read the file and save to a variable so we can do the replacements
|
158
|
+
file_time = File.read("History.markdown")
|
159
|
+
# Replacing the contents of the file for the markdown bullets & issue links
|
160
|
+
rep_bullets = file_time.gsub(/\s{2}\*{1}/, "-")
|
161
|
+
rep_links = rep_bullets.gsub(/#(\d+)/) do |word|
|
162
|
+
"[#{word}](https://github.com/mojombo/jekyll/issues/#{word.delete("#")})"
|
163
|
+
end
|
164
|
+
# Create a hash for the front matter that is to be included
|
165
|
+
front_matter = {"layout" => "docs", "title" => "History",
|
166
|
+
"permalink" => "/docs/history/",
|
167
|
+
"prev_section" => "upgrading"}
|
168
|
+
# Finally we need to copy the file to the /history directory
|
169
|
+
Dir.chdir('site/docs/') do
|
170
|
+
File.open("history.md", "w") do |file|
|
171
|
+
file.write("#{front_matter.to_yaml}---\n\n")
|
172
|
+
file.write(rep_links)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else
|
176
|
+
puts "Something went wrong"
|
177
|
+
end
|
178
|
+
puts "Done"
|
179
|
+
end
|
146
180
|
end
|
147
181
|
|
148
182
|
#############################################################################
|
data/bin/jekyll
CHANGED
@@ -17,7 +17,7 @@ default_command :help
|
|
17
17
|
global_option '-s', '--source [DIR]', 'Source directory (defaults to ./)'
|
18
18
|
global_option '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)'
|
19
19
|
global_option '--safe', 'Safe mode (defaults to false)'
|
20
|
-
global_option '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
|
20
|
+
global_option '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
|
21
21
|
global_option '--layouts', 'Layouts directory (defaults to ./_layouts)'
|
22
22
|
|
23
23
|
# Option names don't always directly match the configuration value we'd like.
|
@@ -37,8 +37,10 @@ command :new do |c|
|
|
37
37
|
c.syntax = 'jekyll new PATH'
|
38
38
|
c.description = 'Creates a new Jekyll site scaffold in PATH'
|
39
39
|
|
40
|
+
c.option '--force', 'Force creation even if PATH already exists'
|
41
|
+
|
40
42
|
c.action do |args, options|
|
41
|
-
Jekyll::Commands::New.process(args)
|
43
|
+
Jekyll::Commands::New.process(args, options.__hash__)
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
@@ -71,8 +73,8 @@ command :serve do |c|
|
|
71
73
|
c.option '--lsi', 'Use LSI for improved related posts'
|
72
74
|
c.option '--drafts', 'Render posts in the _drafts folder'
|
73
75
|
|
74
|
-
c.option '-
|
75
|
-
c.option '-
|
76
|
+
c.option '-P', '--port [PORT]', 'Port to listen on'
|
77
|
+
c.option '-H', '--host [HOST]', 'Host to bind to'
|
76
78
|
c.option '-b', '--baseurl [URL]', 'Base URL'
|
77
79
|
|
78
80
|
c.action do |args, options|
|
@@ -13,7 +13,7 @@ Feature: Create sites
|
|
13
13
|
Given I have a _posts directory
|
14
14
|
And I have the following post:
|
15
15
|
| title | date | content |
|
16
|
-
| Hackers |
|
16
|
+
| Hackers | 2009-03-27 | My First Exploit |
|
17
17
|
When I run jekyll
|
18
18
|
Then the _site directory should exist
|
19
19
|
And I should see "My First Exploit" in "_site/2009/03/27/hackers.html"
|
@@ -31,7 +31,7 @@ Feature: Create sites
|
|
31
31
|
And I have a _posts directory
|
32
32
|
And I have the following posts:
|
33
33
|
| title | date | layout | content |
|
34
|
-
| Wargames |
|
34
|
+
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
|
35
35
|
And I have a default layout that contains "Post Layout: {{ content }}"
|
36
36
|
When I run jekyll
|
37
37
|
Then the _site directory should exist
|
@@ -49,13 +49,13 @@ Feature: Create sites
|
|
49
49
|
And I have a _posts directory
|
50
50
|
And I have the following posts:
|
51
51
|
| title | date | layout | content |
|
52
|
-
| entry1 |
|
53
|
-
| entry2 |
|
52
|
+
| entry1 | 2009-03-27 | post | content for entry1. |
|
53
|
+
| entry2 | 2009-04-27 | post | content for entry2. |
|
54
54
|
And I have a category/_posts directory
|
55
55
|
And I have the following posts in "category":
|
56
56
|
| title | date | layout | content |
|
57
|
-
| entry3 |
|
58
|
-
| entry4 |
|
57
|
+
| entry3 | 2009-05-27 | post | content for entry3. |
|
58
|
+
| entry4 | 2009-06-27 | post | content for entry4. |
|
59
59
|
When I run jekyll
|
60
60
|
Then the _site directory should exist
|
61
61
|
And I should see "Page : Site contains 2 pages and 4 posts" in "_site/index.html"
|
@@ -99,8 +99,8 @@ Feature: Create sites
|
|
99
99
|
And I have a _posts directory
|
100
100
|
And I have the following posts:
|
101
101
|
| title | date | layout | content |
|
102
|
-
| entry1 | 12
|
103
|
-
| entry2 | 01
|
102
|
+
| entry1 | 2007-12-31 | post | content for entry1. |
|
103
|
+
| entry2 | 2020-01-31 | post | content for entry2. |
|
104
104
|
When I run jekyll
|
105
105
|
Then the _site directory should exist
|
106
106
|
And I should see "URL: /2020/01/31/entry2/" in "_site/index.html"
|
data/features/drafts.feature
CHANGED
@@ -2,13 +2,13 @@ Feature: Draft Posts
|
|
2
2
|
As a hacker who likes to blog
|
3
3
|
I want to be able to preview drafts locally
|
4
4
|
In order to see if they look alright before publishing
|
5
|
-
|
5
|
+
|
6
6
|
Scenario: Preview a draft
|
7
7
|
Given I have a configuration file with "permalink" set to "none"
|
8
8
|
And I have a _drafts directory
|
9
9
|
And I have the following draft:
|
10
10
|
| title | date | layout | content |
|
11
|
-
| Recipe |
|
11
|
+
| Recipe | 2009-03-27 | default | Not baked yet. |
|
12
12
|
When I run jekyll with drafts
|
13
13
|
Then the _site directory should exist
|
14
14
|
And I should see "Not baked yet." in "_site/recipe.html"
|
@@ -19,7 +19,7 @@ Feature: Draft Posts
|
|
19
19
|
And I have a _drafts directory
|
20
20
|
And I have the following draft:
|
21
21
|
| title | date | layout | content |
|
22
|
-
| Recipe |
|
22
|
+
| Recipe | 2009-03-27 | default | Not baked yet. |
|
23
23
|
When I run jekyll
|
24
24
|
Then the _site directory should exist
|
25
25
|
And the "_site/recipe.html" file should not exist
|
@@ -8,7 +8,7 @@ Feature: Embed filters
|
|
8
8
|
And I have a _layouts directory
|
9
9
|
And I have the following post:
|
10
10
|
| title | date | layout | content |
|
11
|
-
| Star Wars |
|
11
|
+
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
|
12
12
|
And I have a default layout that contains "{{ site.time | date_to_xmlschema }}"
|
13
13
|
When I run jekyll
|
14
14
|
Then the _site directory should exist
|
@@ -19,7 +19,7 @@ Feature: Embed filters
|
|
19
19
|
And I have a _layouts directory
|
20
20
|
And I have the following post:
|
21
21
|
| title | date | layout | content |
|
22
|
-
| Star & Wars |
|
22
|
+
| Star & Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
|
23
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
|
@@ -30,7 +30,7 @@ Feature: Embed filters
|
|
30
30
|
And I have a _layouts directory
|
31
31
|
And I have the following post:
|
32
32
|
| title | date | layout | content |
|
33
|
-
| Star Wars |
|
33
|
+
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
|
34
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
|
@@ -41,7 +41,7 @@ Feature: Embed filters
|
|
41
41
|
And I have a _layouts directory
|
42
42
|
And I have the following post:
|
43
43
|
| title | date | layout | tags | content |
|
44
|
-
| Star Wars |
|
44
|
+
| Star Wars | 2009-03-27 | default | [scifi, movies, force] | These aren't the droids you're looking for. |
|
45
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
|
@@ -52,7 +52,7 @@ Feature: Embed filters
|
|
52
52
|
And I have a _layouts directory
|
53
53
|
And I have the following post:
|
54
54
|
| title | date | layout | content |
|
55
|
-
| Star Wars |
|
55
|
+
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
|
56
56
|
And I have a default layout that contains "By {{ '_Obi-wan_' | textilize }}"
|
57
57
|
When I run jekyll
|
58
58
|
Then the _site directory should exist
|
data/features/markdown.feature
CHANGED
@@ -9,7 +9,7 @@ Feature: Markdown
|
|
9
9
|
And I have a _posts directory
|
10
10
|
And I have the following post:
|
11
11
|
| title | date | content | type |
|
12
|
-
| Hackers |
|
12
|
+
| Hackers | 2009-03-27 | # My Title | markdown |
|
13
13
|
When I run jekyll
|
14
14
|
Then the _site directory should exist
|
15
15
|
And I should see "Index" in "_site/index.html"
|
@@ -22,7 +22,7 @@ Feature: Markdown
|
|
22
22
|
And I have a _posts directory
|
23
23
|
And I have the following post:
|
24
24
|
| title | date | content | type |
|
25
|
-
| Hackers |
|
25
|
+
| Hackers | 2009-03-27 | # My Title | markdown |
|
26
26
|
When I run jekyll
|
27
27
|
Then the _site directory should exist
|
28
28
|
And I should see "Index" in "_site/index.html"
|
data/features/pagination.feature
CHANGED
@@ -10,10 +10,10 @@ Feature: Site pagination
|
|
10
10
|
And I have a _posts directory
|
11
11
|
And I have the following posts:
|
12
12
|
| title | date | layout | content |
|
13
|
-
| Wargames |
|
14
|
-
| Wargames2 |
|
15
|
-
| Wargames3 |
|
16
|
-
| Wargames4 |
|
13
|
+
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
|
14
|
+
| Wargames2 | 2009-04-27 | default | The only winning move is not to play2. |
|
15
|
+
| Wargames3 | 2009-05-27 | default | The only winning move is not to play3. |
|
16
|
+
| Wargames4 | 2009-06-27 | default | The only winning move is not to play4. |
|
17
17
|
When I run jekyll
|
18
18
|
Then the _site/page<exist> directory should exist
|
19
19
|
And the "_site/page<exist>/index.html" file should exist
|
@@ -37,10 +37,10 @@ Feature: Site pagination
|
|
37
37
|
And I have a _posts directory
|
38
38
|
And I have the following posts:
|
39
39
|
| title | date | layout | content |
|
40
|
-
| Wargames |
|
41
|
-
| Wargames2 |
|
42
|
-
| Wargames3 |
|
43
|
-
| Wargames4 |
|
40
|
+
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
|
41
|
+
| Wargames2 | 2009-04-27 | default | The only winning move is not to play2. |
|
42
|
+
| Wargames3 | 2009-05-27 | default | The only winning move is not to play3. |
|
43
|
+
| Wargames4 | 2009-06-27 | default | The only winning move is not to play4. |
|
44
44
|
When I run jekyll
|
45
45
|
Then the _site/blog/page-<exist> directory should exist
|
46
46
|
And the "_site/blog/page-<exist>/index.html" file should exist
|
data/features/permalinks.feature
CHANGED
@@ -7,7 +7,7 @@ Feature: Fancy permalinks
|
|
7
7
|
Given I have a _posts directory
|
8
8
|
And I have the following post:
|
9
9
|
| title | date | content |
|
10
|
-
| None Permalink Schema |
|
10
|
+
| None Permalink Schema | 2009-03-27 | Totally nothing. |
|
11
11
|
And I have a configuration file with "permalink" set to "none"
|
12
12
|
When I run jekyll
|
13
13
|
Then the _site directory should exist
|
@@ -17,7 +17,7 @@ Feature: Fancy permalinks
|
|
17
17
|
Given I have a _posts directory
|
18
18
|
And I have the following post:
|
19
19
|
| title | date | content |
|
20
|
-
| Pretty Permalink Schema |
|
20
|
+
| Pretty Permalink Schema | 2009-03-27 | Totally wordpress. |
|
21
21
|
And I have a configuration file with "permalink" set to "pretty"
|
22
22
|
When I run jekyll
|
23
23
|
Then the _site directory should exist
|
@@ -38,7 +38,7 @@ Feature: Fancy permalinks
|
|
38
38
|
Given I have a _posts directory
|
39
39
|
And I have the following post:
|
40
40
|
| title | category | date | content |
|
41
|
-
| Custom Permalink Schema | stuff |
|
41
|
+
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
|
42
42
|
And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title"
|
43
43
|
When I run jekyll
|
44
44
|
Then the _site directory should exist
|
@@ -48,7 +48,7 @@ Feature: Fancy permalinks
|
|
48
48
|
Given I have a _posts directory
|
49
49
|
And I have the following post:
|
50
50
|
| title | category | date | content |
|
51
|
-
| Custom Permalink Schema | stuff |
|
51
|
+
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
|
52
52
|
And I have a configuration file with "permalink" set to "/:categories/:title.html"
|
53
53
|
When I run jekyll
|
54
54
|
Then the _site directory should exist
|
@@ -58,7 +58,7 @@ Feature: Fancy permalinks
|
|
58
58
|
Given I have a _posts directory
|
59
59
|
And I have the following post:
|
60
60
|
| title | category | date | content |
|
61
|
-
| Custom Permalink Schema | stuff |
|
61
|
+
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
|
62
62
|
And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html"
|
63
63
|
When I run jekyll
|
64
64
|
Then the _site directory should exist
|
data/features/post_data.feature
CHANGED
@@ -8,7 +8,7 @@ Feature: Post data
|
|
8
8
|
And I have a _layouts directory
|
9
9
|
And I have the following post:
|
10
10
|
| title | date | layout | content |
|
11
|
-
| Star Wars |
|
11
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
12
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
|
@@ -19,7 +19,7 @@ Feature: Post data
|
|
19
19
|
And I have a _layouts directory
|
20
20
|
And I have the following post:
|
21
21
|
| title | date | layout | content |
|
22
|
-
| Star Wars |
|
22
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
23
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
|
@@ -30,7 +30,7 @@ Feature: Post data
|
|
30
30
|
And I have a _layouts directory
|
31
31
|
And I have the following post:
|
32
32
|
| title | date | layout | content |
|
33
|
-
| Star Wars |
|
33
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
34
34
|
And I have a simple layout that contains "Post date: {{ page.date | date_to_string }}"
|
35
35
|
When I run jekyll
|
36
36
|
Then the _site directory should exist
|
@@ -41,7 +41,7 @@ Feature: Post data
|
|
41
41
|
And I have a _layouts directory
|
42
42
|
And I have the following post:
|
43
43
|
| title | date | layout | content |
|
44
|
-
| Star Wars |
|
44
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
45
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
|
@@ -52,7 +52,7 @@ Feature: Post data
|
|
52
52
|
And I have a _layouts directory
|
53
53
|
And I have the following post:
|
54
54
|
| title | date | layout | content |
|
55
|
-
| Star Wars |
|
55
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
56
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
|
@@ -64,7 +64,7 @@ Feature: Post data
|
|
64
64
|
And I have a _layouts directory
|
65
65
|
And I have the following post in "movies":
|
66
66
|
| title | date | layout | content |
|
67
|
-
| Star Wars |
|
67
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
68
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
|
@@ -75,7 +75,7 @@ Feature: Post data
|
|
75
75
|
And I have a _layouts directory
|
76
76
|
And I have the following post:
|
77
77
|
| title | date | layout | tag | content |
|
78
|
-
| Star Wars |
|
78
|
+
| Star Wars | 2009-05-18 | simple | twist | Luke, I am your father. |
|
79
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
|
@@ -88,7 +88,7 @@ Feature: Post data
|
|
88
88
|
And I have a _layouts directory
|
89
89
|
And I have the following post in "scifi/movies":
|
90
90
|
| title | date | layout | content |
|
91
|
-
| Star Wars |
|
91
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
92
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
|
@@ -101,7 +101,7 @@ Feature: Post data
|
|
101
101
|
And I have a _layouts directory
|
102
102
|
And I have the following post in "scifi/Movies":
|
103
103
|
| title | date | layout | content |
|
104
|
-
| Star Wars |
|
104
|
+
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
|
105
105
|
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
|
106
106
|
When I run jekyll
|
107
107
|
Then the _site directory should exist
|
@@ -112,29 +112,29 @@ Feature: Post data
|
|
112
112
|
And I have a _layouts directory
|
113
113
|
And I have the following post:
|
114
114
|
| title | date | layout | category | content |
|
115
|
-
| Star Wars |
|
115
|
+
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
|
116
116
|
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
117
117
|
When I run jekyll
|
118
118
|
Then the _site directory should exist
|
119
119
|
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
120
|
-
|
120
|
+
|
121
121
|
Scenario: Use post.categories variable when category is in YAML and is mixed-case
|
122
122
|
Given I have a _posts directory
|
123
123
|
And I have a _layouts directory
|
124
124
|
And I have the following post:
|
125
125
|
| title | date | layout | category | content |
|
126
|
-
| Star Wars |
|
126
|
+
| Star Wars | 2009-03-27 | simple | Movies | Luke, I am your father. |
|
127
127
|
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
128
128
|
When I run jekyll
|
129
129
|
Then the _site directory should exist
|
130
130
|
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
131
|
-
|
131
|
+
|
132
132
|
Scenario: Use post.categories variable when category is in YAML
|
133
133
|
Given I have a _posts directory
|
134
134
|
And I have a _layouts directory
|
135
135
|
And I have the following post:
|
136
136
|
| title | date | layout | category | content |
|
137
|
-
| Star Wars |
|
137
|
+
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
|
138
138
|
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
139
139
|
When I run jekyll
|
140
140
|
Then the _site directory should exist
|
@@ -145,8 +145,8 @@ Feature: Post data
|
|
145
145
|
And I have a _layouts directory
|
146
146
|
And I have the following posts:
|
147
147
|
| title | date | layout | categories | content |
|
148
|
-
| Star Wars |
|
149
|
-
| Star Trek |
|
148
|
+
| Star Wars | 2009-03-27 | simple | ['scifi', 'Movies'] | Luke, I am your father. |
|
149
|
+
| Star Trek | 2013-03-17 | simple | ['SciFi', 'movies'] | Jean Luc, I am your father. |
|
150
150
|
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
|
151
151
|
When I run jekyll
|
152
152
|
Then the _site directory should exist
|
@@ -157,7 +157,7 @@ Feature: Post data
|
|
157
157
|
Given I have a <dir>/_posts directory
|
158
158
|
And I have the following post in "<dir>":
|
159
159
|
| title | type | date | content |
|
160
|
-
| my-post | html |
|
160
|
+
| my-post | html | 2013-04-12 | Source path: {{ page.path }} |
|
161
161
|
When I run jekyll
|
162
162
|
Then the _site directory should exist
|
163
163
|
And I should see "Source path: <path_prefix>_posts/2013-04-12-my-post.html" in "_site/<dir>/2013/04/12/my-post.html"
|
@@ -172,7 +172,7 @@ Feature: Post data
|
|
172
172
|
Given I have a _posts directory
|
173
173
|
And I have the following post:
|
174
174
|
| title | date | path | content |
|
175
|
-
| override |
|
175
|
+
| override | 2013-04-12 | override-path.html | Custom path: {{ page.path }} |
|
176
176
|
When I run jekyll
|
177
177
|
Then the _site directory should exist
|
178
178
|
And I should see "Custom path: override-path.html" in "_site/2013/04/12/override.html"
|
@@ -182,7 +182,7 @@ Feature: Post data
|
|
182
182
|
And I have an "index.html" file that contains "Published!"
|
183
183
|
And I have the following post:
|
184
184
|
| title | date | layout | published | content |
|
185
|
-
| Star Wars |
|
185
|
+
| Star Wars | 2009-03-27 | simple | false | Luke, I am your father. |
|
186
186
|
When I run jekyll
|
187
187
|
Then the _site directory should exist
|
188
188
|
And the "_site/2009/03/27/star-wars.html" file should not exist
|
@@ -193,7 +193,7 @@ Feature: Post data
|
|
193
193
|
And I have a _layouts directory
|
194
194
|
And I have the following post:
|
195
195
|
| title | date | layout | author | content |
|
196
|
-
| Star Wars |
|
196
|
+
| Star Wars | 2009-03-27 | simple | Darth Vader | Luke, I am your father. |
|
197
197
|
And I have a simple layout that contains "Post author: {{ page.author }}"
|
198
198
|
When I run jekyll
|
199
199
|
Then the _site directory should exist
|
@@ -204,9 +204,9 @@ Feature: Post data
|
|
204
204
|
And I have a _layouts directory
|
205
205
|
And I have the following posts:
|
206
206
|
| title | date | layout | author | content |
|
207
|
-
| Star Wars |
|
208
|
-
| Some like it hot |
|
209
|
-
| Terminator |
|
207
|
+
| Star Wars | 2009-03-27 | ordered | Darth Vader | Luke, I am your father. |
|
208
|
+
| Some like it hot | 2009-04-27 | ordered | Osgood | Nobody is perfect. |
|
209
|
+
| Terminator | 2009-05-27 | ordered | Arnold | Sayonara, baby |
|
210
210
|
And I have a ordered layout that contains "Previous post: {{ page.previous.title }} and next post: {{ page.next.title }}"
|
211
211
|
When I run jekyll
|
212
212
|
Then the _site directory should exist
|