spinto-jekyll 0.11.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -0
- data/History.txt +321 -0
- data/LICENSE +21 -0
- data/README.textile +41 -0
- data/Rakefile +166 -0
- data/bin/jekyll +289 -0
- data/cucumber.yml +1 -0
- data/features/create_sites.feature +112 -0
- data/features/embed_filters.feature +60 -0
- data/features/markdown.feature +30 -0
- data/features/pagination.feature +27 -0
- data/features/permalinks.feature +65 -0
- data/features/post_data.feature +153 -0
- data/features/site_configuration.feature +145 -0
- data/features/site_data.feature +82 -0
- data/features/step_definitions/jekyll_steps.rb +145 -0
- data/features/support/env.rb +19 -0
- data/lib/jekyll.rb +136 -0
- data/lib/jekyll/converter.rb +50 -0
- data/lib/jekyll/converters/identity.rb +22 -0
- data/lib/jekyll/converters/markdown.rb +125 -0
- data/lib/jekyll/converters/textile.rb +50 -0
- data/lib/jekyll/convertible.rb +112 -0
- data/lib/jekyll/core_ext.rb +52 -0
- data/lib/jekyll/errors.rb +6 -0
- data/lib/jekyll/filters.rb +118 -0
- data/lib/jekyll/generator.rb +7 -0
- data/lib/jekyll/generators/pagination.rb +113 -0
- data/lib/jekyll/layout.rb +44 -0
- data/lib/jekyll/migrators/csv.rb +26 -0
- data/lib/jekyll/migrators/drupal.rb +103 -0
- data/lib/jekyll/migrators/enki.rb +49 -0
- data/lib/jekyll/migrators/joomla.rb +53 -0
- data/lib/jekyll/migrators/marley.rb +52 -0
- data/lib/jekyll/migrators/mephisto.rb +84 -0
- data/lib/jekyll/migrators/mt.rb +86 -0
- data/lib/jekyll/migrators/posterous.rb +67 -0
- data/lib/jekyll/migrators/rss.rb +47 -0
- data/lib/jekyll/migrators/textpattern.rb +58 -0
- data/lib/jekyll/migrators/tumblr.rb +195 -0
- data/lib/jekyll/migrators/typo.rb +51 -0
- data/lib/jekyll/migrators/wordpress.rb +294 -0
- data/lib/jekyll/migrators/wordpressdotcom.rb +70 -0
- data/lib/jekyll/page.rb +155 -0
- data/lib/jekyll/plugin.rb +77 -0
- data/lib/jekyll/post.rb +257 -0
- data/lib/jekyll/site.rb +337 -0
- data/lib/jekyll/static_file.rb +72 -0
- data/lib/jekyll/tags/highlight.rb +76 -0
- data/lib/jekyll/tags/include.rb +37 -0
- data/lib/jekyll/tags/post_url.rb +38 -0
- data/lib/spinto-jekyll.rb +3 -0
- data/spinto-jekyll.gemspec +155 -0
- data/test/helper.rb +34 -0
- data/test/source/.htaccess +8 -0
- data/test/source/_includes/sig.markdown +3 -0
- data/test/source/_layouts/default.html +27 -0
- data/test/source/_layouts/simple.html +1 -0
- data/test/source/_posts/2008-02-02-not-published.textile +8 -0
- data/test/source/_posts/2008-02-02-published.textile +8 -0
- data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
- data/test/source/_posts/2008-11-21-complex.textile +8 -0
- data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
- data/test/source/_posts/2008-12-13-include.markdown +8 -0
- data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
- data/test/source/_posts/2009-01-27-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-category.textile +7 -0
- data/test/source/_posts/2009-01-27-empty-categories.textile +7 -0
- data/test/source/_posts/2009-01-27-empty-category.textile +7 -0
- data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
- data/test/source/_posts/2009-05-18-empty-tag.textile +6 -0
- data/test/source/_posts/2009-05-18-empty-tags.textile +6 -0
- data/test/source/_posts/2009-05-18-tag.textile +6 -0
- data/test/source/_posts/2009-05-18-tags.textile +9 -0
- data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
- data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
- data/test/source/_posts/2010-01-08-triple-dash.markdown +5 -0
- data/test/source/_posts/2010-01-09-date-override.textile +7 -0
- data/test/source/_posts/2010-01-09-time-override.textile +7 -0
- data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
- data/test/source/_posts/2010-01-16-override-data.textile +4 -0
- data/test/source/_posts/2011-04-12-md-extension.md +7 -0
- data/test/source/_posts/2011-04-12-text-extension.text +0 -0
- data/test/source/about.html +6 -0
- data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
- data/test/source/contacts.html +5 -0
- data/test/source/css/screen.css +76 -0
- data/test/source/deal.with.dots.html +7 -0
- data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
- data/test/source/index.html +22 -0
- data/test/source/sitemap.xml +32 -0
- data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
- data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
- data/test/suite.rb +11 -0
- data/test/test_configuration.rb +29 -0
- data/test/test_core_ext.rb +66 -0
- data/test/test_filters.rb +62 -0
- data/test/test_generated_site.rb +72 -0
- data/test/test_kramdown.rb +23 -0
- data/test/test_page.rb +117 -0
- data/test/test_pager.rb +113 -0
- data/test/test_post.rb +456 -0
- data/test/test_rdiscount.rb +18 -0
- data/test/test_redcarpet.rb +21 -0
- data/test/test_redcloth.rb +86 -0
- data/test/test_site.rb +220 -0
- data/test/test_tags.rb +201 -0
- metadata +336 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Feature: Site pagination
|
|
2
|
+
In order to paginate my blog
|
|
3
|
+
As a blog's user
|
|
4
|
+
I want divide the posts in several pages
|
|
5
|
+
|
|
6
|
+
Scenario Outline: Paginate with N posts per page
|
|
7
|
+
Given I have a configuration file with "paginate" set to "<num>"
|
|
8
|
+
And I have a _layouts directory
|
|
9
|
+
And I have an "index.html" page that contains "{{ paginator.posts.size }}"
|
|
10
|
+
And I have a _posts directory
|
|
11
|
+
And I have the following post:
|
|
12
|
+
| title | date | layout | content |
|
|
13
|
+
| Wargames | 3/27/2009 | default | The only winning move is not to play. |
|
|
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 play3. |
|
|
16
|
+
| Wargames4 | 6/27/2009 | default | The only winning move is not to play4. |
|
|
17
|
+
When I run jekyll
|
|
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
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
| num | exist | posts | not_exist |
|
|
25
|
+
| 1 | 4 | 1 | 5 |
|
|
26
|
+
| 2 | 2 | 2 | 3 |
|
|
27
|
+
| 3 | 2 | 1 | 3 |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Feature: Fancy permalinks
|
|
2
|
+
As a hacker who likes to blog
|
|
3
|
+
I want to be able to set permalinks
|
|
4
|
+
In order to make my blog URLs awesome
|
|
5
|
+
|
|
6
|
+
Scenario: Use none permalink schema
|
|
7
|
+
Given I have a _posts directory
|
|
8
|
+
And I have the following post:
|
|
9
|
+
| title | date | content |
|
|
10
|
+
| None Permalink Schema | 3/27/2009 | Totally nothing. |
|
|
11
|
+
And I have a configuration file with "permalink" set to "none"
|
|
12
|
+
When I run jekyll
|
|
13
|
+
Then the _site directory should exist
|
|
14
|
+
And I should see "Totally nothing." in "_site/none-permalink-schema.html"
|
|
15
|
+
|
|
16
|
+
Scenario: Use pretty permalink schema
|
|
17
|
+
Given I have a _posts directory
|
|
18
|
+
And I have the following post:
|
|
19
|
+
| title | date | content |
|
|
20
|
+
| Pretty Permalink Schema | 3/27/2009 | Totally wordpress. |
|
|
21
|
+
And I have a configuration file with "permalink" set to "pretty"
|
|
22
|
+
When I run jekyll
|
|
23
|
+
Then the _site directory should exist
|
|
24
|
+
And I should see "Totally wordpress." in "_site/2009/03/27/pretty-permalink-schema/index.html"
|
|
25
|
+
|
|
26
|
+
Scenario: Use pretty permalink schema for pages
|
|
27
|
+
Given I have an "index.html" page that contains "Totally index"
|
|
28
|
+
And I have an "awesome.html" page that contains "Totally awesome"
|
|
29
|
+
And I have an "sitemap.xml" page that contains "Totally uhm, sitemap"
|
|
30
|
+
And I have a configuration file with "permalink" set to "pretty"
|
|
31
|
+
When I run jekyll
|
|
32
|
+
Then the _site directory should exist
|
|
33
|
+
And I should see "Totally index" in "_site/index.html"
|
|
34
|
+
And I should see "Totally awesome" in "_site/awesome/index.html"
|
|
35
|
+
And I should see "Totally uhm, sitemap" in "_site/sitemap.xml"
|
|
36
|
+
|
|
37
|
+
Scenario: Use custom permalink schema with prefix
|
|
38
|
+
Given I have a _posts directory
|
|
39
|
+
And I have the following post:
|
|
40
|
+
| title | category | date | content |
|
|
41
|
+
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
|
|
42
|
+
And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title"
|
|
43
|
+
When I run jekyll
|
|
44
|
+
Then the _site directory should exist
|
|
45
|
+
And I should see "Totally custom." in "_site/blog/2009/03/27/custom-permalink-schema/index.html"
|
|
46
|
+
|
|
47
|
+
Scenario: Use custom permalink schema with category
|
|
48
|
+
Given I have a _posts directory
|
|
49
|
+
And I have the following post:
|
|
50
|
+
| title | category | date | content |
|
|
51
|
+
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
|
|
52
|
+
And I have a configuration file with "permalink" set to "/:categories/:title.html"
|
|
53
|
+
When I run jekyll
|
|
54
|
+
Then the _site directory should exist
|
|
55
|
+
And I should see "Totally custom." in "_site/stuff/custom-permalink-schema.html"
|
|
56
|
+
|
|
57
|
+
Scenario: Use custom permalink schema with squished date
|
|
58
|
+
Given I have a _posts directory
|
|
59
|
+
And I have the following post:
|
|
60
|
+
| title | category | date | content |
|
|
61
|
+
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
|
|
62
|
+
And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html"
|
|
63
|
+
When I run jekyll
|
|
64
|
+
Then the _site directory should exist
|
|
65
|
+
And I should see "Totally custom." in "_site/03-27-2009/custom-permalink-schema.html"
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Feature: Post data
|
|
2
|
+
As a hacker who likes to blog
|
|
3
|
+
I want to be able to embed data into my posts
|
|
4
|
+
In order to make the posts slightly dynamic
|
|
5
|
+
|
|
6
|
+
Scenario: Use post.title variable
|
|
7
|
+
Given I have a _posts directory
|
|
8
|
+
And I have a _layouts directory
|
|
9
|
+
And I have the following post:
|
|
10
|
+
| title | date | layout | content |
|
|
11
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
12
|
+
And I have a simple layout that contains "Post title: {{ page.title }}"
|
|
13
|
+
When I run jekyll
|
|
14
|
+
Then the _site directory should exist
|
|
15
|
+
And I should see "Post title: Star Wars" in "_site/2009/03/27/star-wars.html"
|
|
16
|
+
|
|
17
|
+
Scenario: Use post.url variable
|
|
18
|
+
Given I have a _posts directory
|
|
19
|
+
And I have a _layouts directory
|
|
20
|
+
And I have the following post:
|
|
21
|
+
| title | date | layout | content |
|
|
22
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
23
|
+
And I have a simple layout that contains "Post url: {{ page.url }}"
|
|
24
|
+
When I run jekyll
|
|
25
|
+
Then the _site directory should exist
|
|
26
|
+
And I should see "Post url: /2009/03/27/star-wars.html" in "_site/2009/03/27/star-wars.html"
|
|
27
|
+
|
|
28
|
+
Scenario: Use post.date variable
|
|
29
|
+
Given I have a _posts directory
|
|
30
|
+
And I have a _layouts directory
|
|
31
|
+
And I have the following post:
|
|
32
|
+
| title | date | layout | content |
|
|
33
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
34
|
+
And I have a simple layout that contains "Post date: {{ page.date | date_to_string }}"
|
|
35
|
+
When I run jekyll
|
|
36
|
+
Then the _site directory should exist
|
|
37
|
+
And I should see "Post date: 27 Mar 2009" in "_site/2009/03/27/star-wars.html"
|
|
38
|
+
|
|
39
|
+
Scenario: Use post.id variable
|
|
40
|
+
Given I have a _posts directory
|
|
41
|
+
And I have a _layouts directory
|
|
42
|
+
And I have the following post:
|
|
43
|
+
| title | date | layout | content |
|
|
44
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
45
|
+
And I have a simple layout that contains "Post id: {{ page.id }}"
|
|
46
|
+
When I run jekyll
|
|
47
|
+
Then the _site directory should exist
|
|
48
|
+
And I should see "Post id: /2009/03/27/star-wars" in "_site/2009/03/27/star-wars.html"
|
|
49
|
+
|
|
50
|
+
Scenario: Use post.content variable
|
|
51
|
+
Given I have a _posts directory
|
|
52
|
+
And I have a _layouts directory
|
|
53
|
+
And I have the following post:
|
|
54
|
+
| title | date | layout | content |
|
|
55
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
56
|
+
And I have a simple layout that contains "Post content: {{ content }}"
|
|
57
|
+
When I run jekyll
|
|
58
|
+
Then the _site directory should exist
|
|
59
|
+
And I should see "Post content: <p>Luke, I am your father.</p>" in "_site/2009/03/27/star-wars.html"
|
|
60
|
+
|
|
61
|
+
Scenario: Use post.categories variable when category is in a folder
|
|
62
|
+
Given I have a movies directory
|
|
63
|
+
And I have a movies/_posts directory
|
|
64
|
+
And I have a _layouts directory
|
|
65
|
+
And I have the following post in "movies":
|
|
66
|
+
| title | date | layout | content |
|
|
67
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
68
|
+
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
|
69
|
+
When I run jekyll
|
|
70
|
+
Then the _site directory should exist
|
|
71
|
+
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
|
72
|
+
|
|
73
|
+
Scenario: Use post.tags variable
|
|
74
|
+
Given I have a _posts directory
|
|
75
|
+
And I have a _layouts directory
|
|
76
|
+
And I have the following post:
|
|
77
|
+
| title | date | layout | tag | content |
|
|
78
|
+
| Star Wars | 5/18/2009 | simple | twist | Luke, I am your father. |
|
|
79
|
+
And I have a simple layout that contains "Post tags: {{ page.tags }}"
|
|
80
|
+
When I run jekyll
|
|
81
|
+
Then the _site directory should exist
|
|
82
|
+
And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html"
|
|
83
|
+
|
|
84
|
+
Scenario: Use post.categories variable when categories are in folders
|
|
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
|
+
And I have a _layouts directory
|
|
89
|
+
And I have the following post in "scifi/movies":
|
|
90
|
+
| title | date | layout | content |
|
|
91
|
+
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
|
|
92
|
+
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
|
|
93
|
+
When I run jekyll
|
|
94
|
+
Then the _site directory should exist
|
|
95
|
+
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
|
|
96
|
+
|
|
97
|
+
Scenario: Use post.categories variable when category is in YAML
|
|
98
|
+
Given I have a _posts directory
|
|
99
|
+
And I have a _layouts directory
|
|
100
|
+
And I have the following post:
|
|
101
|
+
| title | date | layout | category | content |
|
|
102
|
+
| Star Wars | 3/27/2009 | simple | movies | Luke, I am your father. |
|
|
103
|
+
And I have a simple layout that contains "Post category: {{ page.categories }}"
|
|
104
|
+
When I run jekyll
|
|
105
|
+
Then the _site directory should exist
|
|
106
|
+
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
|
|
107
|
+
|
|
108
|
+
Scenario: Use post.categories variable when categories are in YAML
|
|
109
|
+
Given I have a _posts directory
|
|
110
|
+
And I have a _layouts directory
|
|
111
|
+
And I have the following post:
|
|
112
|
+
| title | date | layout | categories | content |
|
|
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
|
+
When I run jekyll
|
|
116
|
+
Then the _site directory should exist
|
|
117
|
+
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
|
|
118
|
+
|
|
119
|
+
Scenario: Disable a post from being published
|
|
120
|
+
Given I have a _posts directory
|
|
121
|
+
And I have an "index.html" file that contains "Published!"
|
|
122
|
+
And I have the following post:
|
|
123
|
+
| title | date | layout | published | content |
|
|
124
|
+
| Star Wars | 3/27/2009 | simple | false | Luke, I am your father. |
|
|
125
|
+
When I run jekyll
|
|
126
|
+
Then the _site directory should exist
|
|
127
|
+
And the "_site/2009/03/27/star-wars.html" file should not exist
|
|
128
|
+
And I should see "Published!" in "_site/index.html"
|
|
129
|
+
|
|
130
|
+
Scenario: Use a custom variable
|
|
131
|
+
Given I have a _posts directory
|
|
132
|
+
And I have a _layouts directory
|
|
133
|
+
And I have the following post:
|
|
134
|
+
| title | date | layout | author | content |
|
|
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: {{ page.author }}"
|
|
137
|
+
When I run jekyll
|
|
138
|
+
Then the _site directory should exist
|
|
139
|
+
And I should see "Post author: Darth Vader" in "_site/2009/03/27/star-wars.html"
|
|
140
|
+
|
|
141
|
+
Scenario: Previous and next posts title
|
|
142
|
+
Given I have a _posts directory
|
|
143
|
+
And I have a _layouts directory
|
|
144
|
+
And I have the following posts:
|
|
145
|
+
| title | date | layout | author | content |
|
|
146
|
+
| Star Wars | 3/27/2009 | ordered | Darth Vader | Luke, I am your father. |
|
|
147
|
+
| Some like it hot | 4/27/2009 | ordered | Osgood | Nobody is perfect. |
|
|
148
|
+
| Terminator | 5/27/2009 | ordered | Arnold | Sayonara, baby |
|
|
149
|
+
And I have a ordered layout that contains "Previous post: {{ page.previous.title }} and next post: {{ page.next.title }}"
|
|
150
|
+
When I run jekyll
|
|
151
|
+
Then the _site directory should exist
|
|
152
|
+
And I should see "next post: Some like it hot" in "_site/2009/03/27/star-wars.html"
|
|
153
|
+
And I should see "Previous post: Some like it hot" in "_site/2009/05/27/terminator.html"
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Feature: Site configuration
|
|
2
|
+
As a hacker who likes to blog
|
|
3
|
+
I want to be able to configure jekyll
|
|
4
|
+
In order to make setting up a site easier
|
|
5
|
+
|
|
6
|
+
Scenario: Change destination directory
|
|
7
|
+
Given I have a blank site in "_sourcedir"
|
|
8
|
+
And I have an "_sourcedir/index.html" file that contains "Changing source directory"
|
|
9
|
+
And I have a configuration file with "source" set to "_sourcedir"
|
|
10
|
+
When I run jekyll
|
|
11
|
+
Then the _site directory should exist
|
|
12
|
+
And I should see "Changing source directory" in "_site/index.html"
|
|
13
|
+
|
|
14
|
+
Scenario: Change destination directory
|
|
15
|
+
Given I have an "index.html" file that contains "Changing destination directory"
|
|
16
|
+
And I have a configuration file with "destination" set to "_mysite"
|
|
17
|
+
When I run jekyll
|
|
18
|
+
Then the _mysite directory should exist
|
|
19
|
+
And I should see "Changing destination directory" in "_mysite/index.html"
|
|
20
|
+
|
|
21
|
+
Scenario: Exclude files inline
|
|
22
|
+
Given I have an "Rakefile" file that contains "I want to be excluded"
|
|
23
|
+
And I have an "README" file that contains "I want to be excluded"
|
|
24
|
+
And I have an "index.html" file that contains "I want to be included"
|
|
25
|
+
And I have a configuration file with "exclude" set to "Rakefile", "README"
|
|
26
|
+
When I run jekyll
|
|
27
|
+
Then I should see "I want to be included" in "_site/index.html"
|
|
28
|
+
And the "_site/Rakefile" file should not exist
|
|
29
|
+
And the "_site/README" file should not exist
|
|
30
|
+
|
|
31
|
+
Scenario: Exclude files with YAML array
|
|
32
|
+
Given I have an "Rakefile" file that contains "I want to be excluded"
|
|
33
|
+
And I have an "README" file that contains "I want to be excluded"
|
|
34
|
+
And I have an "index.html" file that contains "I want to be included"
|
|
35
|
+
And I have a configuration file with "exclude" set to:
|
|
36
|
+
| value |
|
|
37
|
+
| README |
|
|
38
|
+
| Rakefile |
|
|
39
|
+
When I run jekyll
|
|
40
|
+
Then I should see "I want to be included" in "_site/index.html"
|
|
41
|
+
And the "_site/Rakefile" file should not exist
|
|
42
|
+
And the "_site/README" file should not exist
|
|
43
|
+
|
|
44
|
+
Scenario: Use RDiscount for markup
|
|
45
|
+
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
|
46
|
+
And I have a configuration file with "markdown" set to "rdiscount"
|
|
47
|
+
When I run jekyll
|
|
48
|
+
Then the _site directory should exist
|
|
49
|
+
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
|
50
|
+
|
|
51
|
+
Scenario: Use Kramdown for markup
|
|
52
|
+
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
|
53
|
+
And I have a configuration file with "markdown" set to "kramdown"
|
|
54
|
+
When I run jekyll
|
|
55
|
+
Then the _site directory should exist
|
|
56
|
+
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
|
57
|
+
|
|
58
|
+
Scenario: Use Redcarpet for markup
|
|
59
|
+
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
|
60
|
+
And I have a configuration file with "markdown" set to "redcarpet"
|
|
61
|
+
When I run jekyll
|
|
62
|
+
Then the _site directory should exist
|
|
63
|
+
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
|
64
|
+
|
|
65
|
+
Scenario: Use Maruku for markup
|
|
66
|
+
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
|
67
|
+
And I have a configuration file with "markdown" set to "maruku"
|
|
68
|
+
When I run jekyll
|
|
69
|
+
Then the _site directory should exist
|
|
70
|
+
And I should see "<a href='http://google.com'>Google</a>" in "_site/index.html"
|
|
71
|
+
|
|
72
|
+
Scenario: Highlight code with pygments
|
|
73
|
+
Given I have an "index.html" file that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
|
|
74
|
+
And I have a configuration file with "pygments" set to "true"
|
|
75
|
+
When I run jekyll
|
|
76
|
+
Then the _site directory should exist
|
|
77
|
+
And I should see "puts 'Hello world!'" in "_site/index.html"
|
|
78
|
+
|
|
79
|
+
Scenario: Set time and no future dated posts
|
|
80
|
+
Given I have a _layouts directory
|
|
81
|
+
And I have a page layout that contains "Page Layout: {{ site.posts.size }} on {{ site.time | date: "%Y-%m-%d" }}"
|
|
82
|
+
And I have a post layout that contains "Post Layout: {{ content }}"
|
|
83
|
+
And I have an "index.html" page with layout "page" that contains "site index page"
|
|
84
|
+
And I have a configuration file with:
|
|
85
|
+
| key | value |
|
|
86
|
+
| time | 2010-01-01 |
|
|
87
|
+
| future | false |
|
|
88
|
+
And I have a _posts directory
|
|
89
|
+
And I have the following posts:
|
|
90
|
+
| title | date | layout | content |
|
|
91
|
+
| entry1 | 12/31/2007 | post | content for entry1. |
|
|
92
|
+
| entry2 | 01/31/2020 | post | content for entry2. |
|
|
93
|
+
When I run jekyll
|
|
94
|
+
Then the _site directory should exist
|
|
95
|
+
And I should see "Page Layout: 1 on 2010-01-01" in "_site/index.html"
|
|
96
|
+
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
|
|
97
|
+
And the "_site/2020/01/31/entry2.html" file should not exist
|
|
98
|
+
|
|
99
|
+
Scenario: Set time and future dated posts allowed
|
|
100
|
+
Given I have a _layouts directory
|
|
101
|
+
And I have a page layout that contains "Page Layout: {{ site.posts.size }} on {{ site.time | date: "%Y-%m-%d" }}"
|
|
102
|
+
And I have a post layout that contains "Post Layout: {{ content }}"
|
|
103
|
+
And I have an "index.html" page with layout "page" that contains "site index page"
|
|
104
|
+
And I have a configuration file with:
|
|
105
|
+
| key | value |
|
|
106
|
+
| time | 2010-01-01 |
|
|
107
|
+
| future | true |
|
|
108
|
+
And I have a _posts directory
|
|
109
|
+
And I have the following posts:
|
|
110
|
+
| title | date | layout | content |
|
|
111
|
+
| entry1 | 12/31/2007 | post | content for entry1. |
|
|
112
|
+
| entry2 | 01/31/2020 | post | content for entry2. |
|
|
113
|
+
When I run jekyll
|
|
114
|
+
Then the _site directory should exist
|
|
115
|
+
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
|
|
116
|
+
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
|
|
117
|
+
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
|
|
118
|
+
|
|
119
|
+
Scenario: Limit the number of posts generated by most recent date
|
|
120
|
+
Given I have a _posts directory
|
|
121
|
+
And I have a configuration file with:
|
|
122
|
+
| key | value |
|
|
123
|
+
| limit_posts | 2 |
|
|
124
|
+
And I have the following posts:
|
|
125
|
+
| title | date | content |
|
|
126
|
+
| Apples | 3/27/2009 | An article about apples |
|
|
127
|
+
| Oranges | 4/1/2009 | An article about oranges |
|
|
128
|
+
| Bananas | 4/5/2009 | An article about bananas |
|
|
129
|
+
When I run jekyll
|
|
130
|
+
Then the _site directory should exist
|
|
131
|
+
And the "_site/2009/04/05/bananas.html" file should exist
|
|
132
|
+
And the "_site/2009/04/01/oranges.html" file should exist
|
|
133
|
+
And the "_site/2009/03/27/apples.html" file should not exist
|
|
134
|
+
|
|
135
|
+
Scenario: Copy over normally excluded files when they are explicitly included
|
|
136
|
+
Given I have a ".gitignore" file that contains ".DS_Store"
|
|
137
|
+
And I have an ".htaccess" file that contains "SomeDirective"
|
|
138
|
+
And I have a configuration file with "include" set to:
|
|
139
|
+
| value |
|
|
140
|
+
| .gitignore |
|
|
141
|
+
| .foo |
|
|
142
|
+
When I run jekyll
|
|
143
|
+
Then the _site directory should exist
|
|
144
|
+
And I should see ".DS_Store" in "_site/.gitignore"
|
|
145
|
+
And the "_site/.htaccess" file should not exist
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Feature: Site data
|
|
2
|
+
As a hacker who likes to blog
|
|
3
|
+
I want to be able to embed data into my site
|
|
4
|
+
In order to make the site slightly dynamic
|
|
5
|
+
|
|
6
|
+
Scenario: Use page variable in a page
|
|
7
|
+
Given I have an "contact.html" page with title "Contact" that contains "{{ page.title }}: email@me.com"
|
|
8
|
+
When I run jekyll
|
|
9
|
+
Then the _site directory should exist
|
|
10
|
+
And I should see "Contact: email@me.com" in "_site/contact.html"
|
|
11
|
+
|
|
12
|
+
Scenario: Use site.time variable
|
|
13
|
+
Given I have an "index.html" page that contains "{{ site.time }}"
|
|
14
|
+
When I run jekyll
|
|
15
|
+
Then the _site directory should exist
|
|
16
|
+
And I should see today's time in "_site/index.html"
|
|
17
|
+
|
|
18
|
+
Scenario: Use site.posts variable for latest post
|
|
19
|
+
Given I have a _posts directory
|
|
20
|
+
And I have an "index.html" page that contains "{{ site.posts.first.title }}: {{ site.posts.first.url }}"
|
|
21
|
+
And I have the following posts:
|
|
22
|
+
| title | date | content |
|
|
23
|
+
| First Post | 3/25/2009 | My First Post |
|
|
24
|
+
| Second Post | 3/26/2009 | My Second Post |
|
|
25
|
+
| Third Post | 3/27/2009 | My Third Post |
|
|
26
|
+
When I run jekyll
|
|
27
|
+
Then the _site directory should exist
|
|
28
|
+
And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html"
|
|
29
|
+
|
|
30
|
+
Scenario: Use site.posts variable in a loop
|
|
31
|
+
Given I have a _posts directory
|
|
32
|
+
And I have an "index.html" page that contains "{% for post in site.posts %} {{ post.title }} {% endfor %}"
|
|
33
|
+
And I have the following posts:
|
|
34
|
+
| title | date | content |
|
|
35
|
+
| First Post | 3/25/2009 | My First Post |
|
|
36
|
+
| Second Post | 3/26/2009 | My Second Post |
|
|
37
|
+
| Third Post | 3/27/2009 | My Third Post |
|
|
38
|
+
When I run jekyll
|
|
39
|
+
Then the _site directory should exist
|
|
40
|
+
And I should see "Third Post Second Post First Post" in "_site/index.html"
|
|
41
|
+
|
|
42
|
+
Scenario: Use site.categories.code variable
|
|
43
|
+
Given I have a _posts directory
|
|
44
|
+
And I have an "index.html" page that contains "{% for post in site.categories.code %} {{ post.title }} {% endfor %}"
|
|
45
|
+
And I have the following posts:
|
|
46
|
+
| title | date | category | content |
|
|
47
|
+
| Awesome Hack | 3/26/2009 | code | puts 'Hello World' |
|
|
48
|
+
| Delicious Beer | 3/26/2009 | food | 1) Yuengling |
|
|
49
|
+
When I run jekyll
|
|
50
|
+
Then the _site directory should exist
|
|
51
|
+
And I should see "Awesome Hack" in "_site/index.html"
|
|
52
|
+
|
|
53
|
+
Scenario: Use site.tags variable
|
|
54
|
+
Given I have a _posts directory
|
|
55
|
+
And I have an "index.html" page that contains "{% for post in site.tags.beer %} {{ post.content }} {% endfor %}"
|
|
56
|
+
And I have the following posts:
|
|
57
|
+
| title | date | tag | content |
|
|
58
|
+
| Delicious Beer | 3/26/2009 | beer | 1) Yuengling |
|
|
59
|
+
When I run jekyll
|
|
60
|
+
Then the _site directory should exist
|
|
61
|
+
And I should see "Yuengling" in "_site/index.html"
|
|
62
|
+
|
|
63
|
+
Scenario: Order Posts by name when on the same date
|
|
64
|
+
Given I have a _posts directory
|
|
65
|
+
And I have an "index.html" page that contains "{% for post in site.posts %}{{ post.title }}:{{ post.previous.title}},{{ post.next.title}} {% endfor %}"
|
|
66
|
+
And I have the following posts:
|
|
67
|
+
| title | date | content |
|
|
68
|
+
| first | 2/26/2009 | first |
|
|
69
|
+
| A | 3/26/2009 | A |
|
|
70
|
+
| B | 3/26/2009 | B |
|
|
71
|
+
| C | 3/26/2009 | C |
|
|
72
|
+
| last | 4/26/2009 | last |
|
|
73
|
+
When I run jekyll
|
|
74
|
+
Then the _site directory should exist
|
|
75
|
+
And I should see "last:C, C:B,last B:A,C A:first,B first:,A" in "_site/index.html"
|
|
76
|
+
|
|
77
|
+
Scenario: Use configuration date in site payload
|
|
78
|
+
Given I have an "index.html" page that contains "{{ site.url }}"
|
|
79
|
+
And I have a configuration file with "url" set to "http://mysite.com"
|
|
80
|
+
When I run jekyll
|
|
81
|
+
Then the _site directory should exist
|
|
82
|
+
And I should see "http://mysite.com" in "_site/index.html"
|