realityforge-jekyll 0.7.1-java

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.
Files changed (91) hide show
  1. data/History.txt +255 -0
  2. data/LICENSE +21 -0
  3. data/README.textile +41 -0
  4. data/Rakefile +159 -0
  5. data/bin/jekyll +178 -0
  6. data/cucumber.yml +1 -0
  7. data/features/create_sites.feature +94 -0
  8. data/features/embed_filters.feature +60 -0
  9. data/features/markdown.feature +30 -0
  10. data/features/pagination.feature +27 -0
  11. data/features/permalinks.feature +65 -0
  12. data/features/post_data.feature +153 -0
  13. data/features/site_configuration.feature +103 -0
  14. data/features/site_data.feature +82 -0
  15. data/features/step_definitions/jekyll_steps.rb +145 -0
  16. data/features/support/env.rb +16 -0
  17. data/jekyll.gemspec +135 -0
  18. data/lib/jekyll.rb +109 -0
  19. data/lib/jekyll/albino.rb +120 -0
  20. data/lib/jekyll/converter.rb +50 -0
  21. data/lib/jekyll/converters/identity.rb +22 -0
  22. data/lib/jekyll/converters/markdown.rb +80 -0
  23. data/lib/jekyll/converters/textile.rb +33 -0
  24. data/lib/jekyll/convertible.rb +82 -0
  25. data/lib/jekyll/core_ext.rb +52 -0
  26. data/lib/jekyll/errors.rb +6 -0
  27. data/lib/jekyll/filters.rb +47 -0
  28. data/lib/jekyll/generator.rb +7 -0
  29. data/lib/jekyll/generators/pagination.rb +87 -0
  30. data/lib/jekyll/layout.rb +36 -0
  31. data/lib/jekyll/migrators/csv.rb +26 -0
  32. data/lib/jekyll/migrators/mephisto.rb +79 -0
  33. data/lib/jekyll/migrators/mt.rb +59 -0
  34. data/lib/jekyll/migrators/textpattern.rb +50 -0
  35. data/lib/jekyll/migrators/typo.rb +49 -0
  36. data/lib/jekyll/migrators/wordpress.rb +55 -0
  37. data/lib/jekyll/page.rb +133 -0
  38. data/lib/jekyll/plugin.rb +76 -0
  39. data/lib/jekyll/post.rb +242 -0
  40. data/lib/jekyll/site.rb +235 -0
  41. data/lib/jekyll/static_file.rb +76 -0
  42. data/lib/jekyll/tags/highlight.rb +73 -0
  43. data/lib/jekyll/tags/include.rb +31 -0
  44. data/test/helper.rb +33 -0
  45. data/test/source/_includes/sig.markdown +3 -0
  46. data/test/source/_layouts/default.html +27 -0
  47. data/test/source/_layouts/simple.html +1 -0
  48. data/test/source/_posts/2008-02-02-not-published.textile +8 -0
  49. data/test/source/_posts/2008-02-02-published.textile +8 -0
  50. data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
  51. data/test/source/_posts/2008-11-21-complex.textile +8 -0
  52. data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
  53. data/test/source/_posts/2008-12-13-include.markdown +8 -0
  54. data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
  55. data/test/source/_posts/2009-01-27-categories.textile +7 -0
  56. data/test/source/_posts/2009-01-27-category.textile +7 -0
  57. data/test/source/_posts/2009-01-27-empty-categories.textile +7 -0
  58. data/test/source/_posts/2009-01-27-empty-category.textile +7 -0
  59. data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
  60. data/test/source/_posts/2009-05-18-empty-tag.textile +6 -0
  61. data/test/source/_posts/2009-05-18-empty-tags.textile +6 -0
  62. data/test/source/_posts/2009-05-18-tag.textile +6 -0
  63. data/test/source/_posts/2009-05-18-tags.textile +9 -0
  64. data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
  65. data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
  66. data/test/source/_posts/2010-01-08-triple-dash.markdown +5 -0
  67. data/test/source/_posts/2010-01-09-date-override.textile +7 -0
  68. data/test/source/_posts/2010-01-09-time-override.textile +7 -0
  69. data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
  70. data/test/source/_posts/2010-01-16-override-data.textile +4 -0
  71. data/test/source/about.html +6 -0
  72. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  73. data/test/source/contacts.html +5 -0
  74. data/test/source/css/screen.css +76 -0
  75. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  76. data/test/source/index.html +22 -0
  77. data/test/source/sitemap.xml +32 -0
  78. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  79. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  80. data/test/suite.rb +9 -0
  81. data/test/test_configuration.rb +29 -0
  82. data/test/test_core_ext.rb +66 -0
  83. data/test/test_filters.rb +49 -0
  84. data/test/test_generated_site.rb +44 -0
  85. data/test/test_page.rb +98 -0
  86. data/test/test_pager.rb +113 -0
  87. data/test/test_post.rb +396 -0
  88. data/test/test_rdiscount.rb +18 -0
  89. data/test/test_site.rb +153 -0
  90. data/test/test_tags.rb +116 -0
  91. metadata +282 -0
@@ -0,0 +1,178 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
4
+
5
+ help = <<HELP
6
+ Jekyll is a blog-aware, static site generator.
7
+
8
+ Basic Command Line Usage:
9
+ jekyll # . -> ./_site
10
+ jekyll <path to write generated site> # . -> <path>
11
+ jekyll <path to source> <path to write generated site> # <path> -> <path>
12
+
13
+ Configuration is read from '<source>/_config.yml' but can be overriden
14
+ using the following options:
15
+
16
+ HELP
17
+
18
+ require 'optparse'
19
+ require 'jekyll'
20
+
21
+ exec = {}
22
+ options = {}
23
+ opts = OptionParser.new do |opts|
24
+ opts.banner = help
25
+
26
+ opts.on("--safe", "Safe mode (default unsafe)") do
27
+ options['safe'] = true
28
+ end
29
+
30
+ opts.on("--auto", "Auto-regenerate") do
31
+ options['auto'] = true
32
+ end
33
+
34
+ opts.on("--no-auto", "No auto-regenerate") do
35
+ options['auto'] = false
36
+ end
37
+
38
+ opts.on("--server [PORT]", "Start web server (default port 4000)") do |port|
39
+ options['server'] = true
40
+ options['server_port'] = port unless port.nil?
41
+ end
42
+
43
+ opts.on("--lsi", "Use LSI for better related posts") do
44
+ options['lsi'] = true
45
+ end
46
+
47
+ opts.on("--pygments", "Use pygments to highlight code") do
48
+ options['pygments'] = true
49
+ end
50
+
51
+ opts.on("--rdiscount", "Use rdiscount gem for Markdown") do
52
+ options['markdown'] = 'rdiscount'
53
+ end
54
+
55
+ opts.on("--time [TIME]", "Time to generate the site for") do |time|
56
+ options['time'] = Time.parse(time)
57
+ end
58
+
59
+ opts.on("--future", "Render future dated posts") do
60
+ options['future'] = true
61
+ end
62
+
63
+ opts.on("--no-future", "Do not render future dated posts") do
64
+ options['future'] = false
65
+ end
66
+
67
+ opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
68
+ options['permalink'] = style unless style.nil?
69
+ end
70
+
71
+ opts.on("--paginate [POSTS_PER_PAGE]", "Paginate a blog's posts") do |per_page|
72
+ begin
73
+ options['paginate'] = per_page.to_i
74
+ raise ArgumentError if options['paginate'] == 0
75
+ rescue
76
+ puts 'you must specify a number of posts by page bigger than 0'
77
+ exit 0
78
+ end
79
+ end
80
+
81
+ opts.on("--url [URL]", "Set custom site.url") do |url|
82
+ options['url'] = url
83
+ end
84
+
85
+ opts.on("--version", "Display current version") do
86
+ puts "Jekyll " + Jekyll::VERSION
87
+ exit 0
88
+ end
89
+ end
90
+
91
+ # Read command line options into `options` hash
92
+ opts.parse!
93
+
94
+ # Get source and destintation from command line
95
+ case ARGV.size
96
+ when 0
97
+ when 1
98
+ options['destination'] = ARGV[0]
99
+ when 2
100
+ options['source'] = ARGV[0]
101
+ options['destination'] = ARGV[1]
102
+ else
103
+ puts "Invalid options. Run `jekyll --help` for assistance."
104
+ exit(1)
105
+ end
106
+
107
+ options = Jekyll.configuration(options)
108
+
109
+ # Get source and destination directories (possibly set by config file)
110
+ source = options['source']
111
+ destination = options['destination']
112
+
113
+ # Files to watch
114
+ def globs(source)
115
+ Dir.chdir(source) do
116
+ dirs = Dir['*'].select { |x| File.directory?(x) }
117
+ dirs -= ['_site']
118
+ dirs = dirs.map { |x| "#{x}/**/*" }
119
+ dirs += ['*']
120
+ end
121
+ end
122
+
123
+ # Create the Site
124
+ site = Jekyll::Site.new(options)
125
+
126
+ # Run the directory watcher for auto-generation, if required
127
+ if options['auto']
128
+ require 'directory_watcher'
129
+
130
+ puts "Auto-regenerating enabled: #{source} -> #{destination}"
131
+
132
+ dw = DirectoryWatcher.new(source)
133
+ dw.interval = 1
134
+ dw.glob = globs(source)
135
+
136
+ dw.add_observer do |*args|
137
+ t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
138
+ puts "[#{t}] regeneration: #{args.size} files changed"
139
+ site.process
140
+ end
141
+
142
+ dw.start
143
+
144
+ unless options['server']
145
+ loop { sleep 1000 }
146
+ end
147
+ else
148
+ puts "Building site: #{source} -> #{destination}"
149
+ begin
150
+ site.process
151
+ rescue Jekyll::FatalException
152
+ exit(1)
153
+ end
154
+ puts "Successfully generated site: #{source} -> #{destination}"
155
+ end
156
+
157
+ # Run the server on the specified port, if required
158
+ if options['server']
159
+ require 'webrick'
160
+ include WEBrick
161
+
162
+ FileUtils.mkdir_p(destination)
163
+
164
+ mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
165
+ mime_types.store 'js', 'application/javascript'
166
+
167
+ s = HTTPServer.new(
168
+ :Port => options['server_port'],
169
+ :DocumentRoot => destination,
170
+ :MimeTypes => mime_types
171
+ )
172
+ t = Thread.new {
173
+ s.start
174
+ }
175
+
176
+ trap("INT") { s.shutdown }
177
+ t.join()
178
+ end
@@ -0,0 +1 @@
1
+ default: --format progress
@@ -0,0 +1,94 @@
1
+ Feature: Create sites
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: Basic site
7
+ Given I have an "index.html" file that contains "Basic Site"
8
+ When I run jekyll
9
+ Then the _site directory should exist
10
+ And I should see "Basic Site" in "_site/index.html"
11
+
12
+ Scenario: Basic site with a post
13
+ Given I have a _posts directory
14
+ And I have the following post:
15
+ | title | date | content |
16
+ | Hackers | 3/27/2009 | My First Exploit |
17
+ When I run jekyll
18
+ Then the _site directory should exist
19
+ And I should see "My First Exploit" in "_site/2009/03/27/hackers.html"
20
+
21
+ Scenario: Basic site with layout and a page
22
+ Given I have a _layouts directory
23
+ And I have an "index.html" page with layout "default" that contains "Basic Site with Layout"
24
+ And I have a default layout that contains "Page Layout: {{ content }}"
25
+ When I run jekyll
26
+ Then the _site directory should exist
27
+ And I should see "Page Layout: Basic Site with Layout" in "_site/index.html"
28
+
29
+ Scenario: Basic site with layout and a post
30
+ Given I have a _layouts directory
31
+ And I have a _posts directory
32
+ And I have the following posts:
33
+ | title | date | layout | content |
34
+ | Wargames | 3/27/2009 | default | The only winning move is not to play. |
35
+ And I have a default layout that contains "Post Layout: {{ content }}"
36
+ When I run jekyll
37
+ Then the _site directory should exist
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
+
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 {{ page.title }}: {{ content }}"
43
+ And I have a post layout that contains "Post {{ page.title }}: {{ content }}"
44
+ And I have an "index.html" page with layout "page" that contains "Site contains {{ site.pages.size }} pages and {{ site.posts.size }} posts"
45
+ And I have a blog directory
46
+ And I have a "blog/index.html" page with layout "page" that contains "blog 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 : Site contains 2 pages and 4 posts" 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 : blog category index page" in "_site/blog/index.html"
65
+ And I should see "Post entry1: <p>content for entry1.</p>" in "_site/2009/03/27/entry1.html"
66
+ And I should see "Post entry2: <p>content for entry2.</p>" in "_site/2009/04/27/entry2.html"
67
+ And I should see "Post entry3: <p>content for entry3.</p>" in "_site/category/2009/05/27/entry3.html"
68
+ And I should see "Post entry4: <p>content for entry4.</p>" in "_site/category/2009/06/27/entry4.html"
69
+
70
+ Scenario: Basic site with include tag
71
+ Given I have a _includes directory
72
+ And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
73
+ And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
74
+ When I run jekyll
75
+ Then the _site directory should exist
76
+ And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
77
+
78
+ Scenario: Basic site with subdir include tag
79
+ Given I have a _includes directory
80
+ And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
81
+ And I have an info directory
82
+ And I have an "info/index.html" page that contains "Basic Site with subdir include tag: {% include about.textile %}"
83
+ When I run jekyll
84
+ Then the _site directory should exist
85
+ And I should see "Basic Site with subdir include tag: Generated by Jekyll" in "_site/info/index.html"
86
+
87
+ Scenario: Basic site with nested include tag
88
+ Given I have a _includes directory
89
+ And I have an "_includes/about.textile" file that contains "Generated by {% include jekyll.textile %}"
90
+ And I have an "_includes/jekyll.textile" file that contains "Jekyll"
91
+ And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
92
+ When I run jekyll
93
+ Then the _site directory should exist
94
+ And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
@@ -0,0 +1,60 @@
1
+ Feature: Embed filters
2
+ As a hacker who likes to blog
3
+ I want to be able to transform text inside a post or page
4
+ In order to perform cool stuff in my posts
5
+
6
+ Scenario: Convert date to XML schema
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 | default | These aren't the droids you're looking for. |
12
+ And I have a default layout that contains "{{ site.time | date_to_xmlschema }}"
13
+ When I run jekyll
14
+ Then the _site directory should exist
15
+ And I should see today's date in "_site/2009/03/27/star-wars.html"
16
+
17
+ Scenario: Escape text for XML
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 | default | These aren't the droids you're looking for. |
23
+ And I have a default layout that contains "{{ page.title | xml_escape }}"
24
+ When I run jekyll
25
+ Then the _site directory should exist
26
+ And I should see "Star &amp; Wars" in "_site/2009/03/27/star-wars.html"
27
+
28
+ Scenario: Calculate number of words
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 | default | These aren't the droids you're looking for. |
34
+ And I have a default layout that contains "{{ content | xml_escape }}"
35
+ When I run jekyll
36
+ Then the _site directory should exist
37
+ And I should see "7" in "_site/2009/03/27/star-wars.html"
38
+
39
+ Scenario: Convert an array into a sentence
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 | tags | content |
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 "{{ page.tags | array_to_sentence_string }}"
46
+ When I run jekyll
47
+ Then the _site directory should exist
48
+ And I should see "scifi, movies, and force" in "_site/2009/03/27/star-wars.html"
49
+
50
+ Scenario: Textilize a given string
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 | default | These aren't the droids you're looking for. |
56
+ And I have a default layout that contains "By {{ '_Obi-wan_' | textilize }}"
57
+ When I run jekyll
58
+ Then the _site directory should exist
59
+ And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html"
60
+
@@ -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"