lonnon-jekyll 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/.gitignore +6 -0
  2. data/History.txt +151 -0
  3. data/README.textile +613 -0
  4. data/Rakefile +91 -0
  5. data/VERSION.yml +4 -0
  6. data/bin/jekyll +166 -0
  7. data/features/create_sites.feature +57 -0
  8. data/features/embed_filters.feature +74 -0
  9. data/features/pagination.feature +40 -0
  10. data/features/permalinks.feature +65 -0
  11. data/features/post_data.feature +153 -0
  12. data/features/site_configuration.feature +63 -0
  13. data/features/site_data.feature +82 -0
  14. data/features/step_definitions/jekyll_steps.rb +136 -0
  15. data/features/support/env.rb +16 -0
  16. data/lib/jekyll.rb +86 -0
  17. data/lib/jekyll/albino.rb +122 -0
  18. data/lib/jekyll/converters/csv.rb +26 -0
  19. data/lib/jekyll/converters/mephisto.rb +79 -0
  20. data/lib/jekyll/converters/mt.rb +59 -0
  21. data/lib/jekyll/converters/textpattern.rb +50 -0
  22. data/lib/jekyll/converters/typo.rb +49 -0
  23. data/lib/jekyll/converters/wordpress.rb +61 -0
  24. data/lib/jekyll/convertible.rb +139 -0
  25. data/lib/jekyll/core_ext.rb +37 -0
  26. data/lib/jekyll/filters.rb +56 -0
  27. data/lib/jekyll/haml_helpers.rb +15 -0
  28. data/lib/jekyll/layout.rb +37 -0
  29. data/lib/jekyll/page.rb +112 -0
  30. data/lib/jekyll/pager.rb +45 -0
  31. data/lib/jekyll/post.rb +316 -0
  32. data/lib/jekyll/site.rb +326 -0
  33. data/lib/jekyll/tags/highlight.rb +56 -0
  34. data/lib/jekyll/tags/include.rb +31 -0
  35. data/test/helper.rb +27 -0
  36. data/test/source/_includes/sig.markdown +3 -0
  37. data/test/source/_layouts/default.html +27 -0
  38. data/test/source/_layouts/simple.html +1 -0
  39. data/test/source/_posts/2008-02-02-not-published.textile +8 -0
  40. data/test/source/_posts/2008-02-02-published.textile +8 -0
  41. data/test/source/_posts/2008-10-18-foo-bar.textile +8 -0
  42. data/test/source/_posts/2008-11-21-complex.textile +8 -0
  43. data/test/source/_posts/2008-12-03-permalinked-post.textile +9 -0
  44. data/test/source/_posts/2008-12-13-include.markdown +8 -0
  45. data/test/source/_posts/2009-01-27-array-categories.textile +10 -0
  46. data/test/source/_posts/2009-01-27-categories.textile +7 -0
  47. data/test/source/_posts/2009-01-27-category.textile +7 -0
  48. data/test/source/_posts/2009-03-12-hash-#1.markdown +6 -0
  49. data/test/source/_posts/2009-05-18-tag.textile +6 -0
  50. data/test/source/_posts/2009-05-18-tags.textile +9 -0
  51. data/test/source/_posts/2009-06-22-empty-yaml.textile +3 -0
  52. data/test/source/_posts/2009-06-22-no-yaml.textile +1 -0
  53. data/test/source/_posts/2009-11-27-more-divider.markdown +5 -0
  54. data/test/source/about.html +6 -0
  55. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  56. data/test/source/contacts.html +5 -0
  57. data/test/source/css/screen.css +76 -0
  58. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  59. data/test/source/index.html +22 -0
  60. data/test/source/paginated/_posts/2009-11-29-one-page.markdown +3 -0
  61. data/test/source/paginated/_posts/2009-11-29-red-page.markdown +4 -0
  62. data/test/source/paginated/_posts/2009-11-29-two-page.markdown +3 -0
  63. data/test/source/sitemap.xml +23 -0
  64. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  65. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  66. data/test/suite.rb +9 -0
  67. data/test/test_configuration.rb +29 -0
  68. data/test/test_filters.rb +54 -0
  69. data/test/test_generated_site.rb +40 -0
  70. data/test/test_page.rb +98 -0
  71. data/test/test_pager.rb +47 -0
  72. data/test/test_post.rb +317 -0
  73. data/test/test_site.rb +85 -0
  74. data/test/test_tags.rb +115 -0
  75. metadata +196 -0
data/Rakefile ADDED
@@ -0,0 +1,91 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ begin
6
+ gem 'jeweler', '>= 0.11.0'
7
+ require 'jeweler'
8
+ Jeweler::Tasks.new do |s|
9
+ s.name = "lonnon-jekyll"
10
+ s.summary = %Q{Jekyll is a simple, blog aware, static site generator.}
11
+ s.email = "lonnon.foster@gmail.com"
12
+ s.homepage = "http://github.com/lonnon/jekyll"
13
+ s.description = "Jekyll is a simple, blog aware, static site generator."
14
+ s.authors = ["Tom Preston-Werner, Henrik Nyh, Lonnon Foster"]
15
+ s.rubyforge_project = "lonnon-jekyll"
16
+ s.files.exclude 'test/dest'
17
+ s.test_files.exclude 'test/dest'
18
+ s.add_dependency('RedCloth', '>= 4.2.1')
19
+ s.add_dependency('liquid', '>= 1.9.0')
20
+ s.add_dependency('classifier', '>= 1.3.1')
21
+ s.add_dependency('maruku', '>= 0.5.9')
22
+ s.add_dependency('directory_watcher', '>= 1.1.1')
23
+ s.add_dependency('open4', '>= 0.9.6')
24
+ end
25
+ rescue LoadError
26
+ puts "Jeweler not available. Install it with: sudo gem install jeweler --version '>= 0.11.0'"
27
+ exit(1)
28
+ end
29
+
30
+ Rake::TestTask.new do |t|
31
+ t.libs << 'lib'
32
+ t.pattern = 'test/**/test_*.rb'
33
+ t.verbose = false
34
+ end
35
+
36
+ Rake::RDocTask.new do |rdoc|
37
+ rdoc.rdoc_dir = 'rdoc'
38
+ rdoc.title = 'jekyll'
39
+ rdoc.options << '--line-numbers' << '--inline-source'
40
+ rdoc.rdoc_files.include('README*')
41
+ rdoc.rdoc_files.include('lib/**/*.rb')
42
+ end
43
+
44
+ begin
45
+ require 'rcov/rcovtask'
46
+ Rcov::RcovTask.new do |t|
47
+ t.libs << 'test'
48
+ t.test_files = FileList['test/**/test_*.rb']
49
+ t.verbose = true
50
+ end
51
+ rescue LoadError
52
+ end
53
+
54
+ task :default => [:test, :features]
55
+
56
+ # console
57
+
58
+ desc "Open an irb session preloaded with this library"
59
+ task :console do
60
+ sh "irb -rubygems -I lib -r jekyll.rb"
61
+ end
62
+
63
+ # converters
64
+
65
+ namespace :convert do
66
+ desc "Migrate from mephisto in the current directory"
67
+ task :mephisto do
68
+ sh %q(ruby -r './lib/jekyll/converters/mephisto' -e 'Jekyll::Mephisto.postgres(:database => "#{ENV["DB"]}")')
69
+ end
70
+ desc "Migrate from Movable Type in the current directory"
71
+ task :mt do
72
+ sh %q(ruby -r './lib/jekyll/converters/mt' -e 'Jekyll::MT.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
73
+ end
74
+ desc "Migrate from Typo in the current directory"
75
+ task :typo do
76
+ sh %q(ruby -r './lib/jekyll/converters/typo' -e 'Jekyll::Typo.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
77
+ end
78
+ end
79
+
80
+ begin
81
+ require 'cucumber/rake/task'
82
+
83
+ Cucumber::Rake::Task.new(:features) do |t|
84
+ t.cucumber_opts = "--format progress"
85
+ end
86
+ rescue LoadError
87
+ desc 'Cucumber rake task not available'
88
+ task :features do
89
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
90
+ end
91
+ end
data/VERSION.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ :patch: 0
3
+ :major: 0
4
+ :minor: 6
data/bin/jekyll ADDED
@@ -0,0 +1,166 @@
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("--auto", "Auto-regenerate") do
27
+ options['auto'] = true
28
+ end
29
+
30
+ opts.on("--no-auto", "No auto-regenerate") do
31
+ options['auto'] = false
32
+ end
33
+
34
+ opts.on("--server [PORT]", "Start web server (default port 4000)") do |port|
35
+ options['server'] = true
36
+ options['server_port'] = port unless port.nil?
37
+ end
38
+
39
+ opts.on("--lsi", "Use LSI for better related posts") do
40
+ options['lsi'] = true
41
+ end
42
+
43
+ opts.on("--pygments", "Use pygments to highlight code") do
44
+ options['pygments'] = true
45
+ end
46
+
47
+ opts.on("--pygments-cache", "Path to cache pygments output in, for faster re-rendering") do |path|
48
+ options['pygments_cache'] = path
49
+ end
50
+
51
+ opts.on("--rdiscount", "Use rdiscount gem for Markdown") do
52
+ options['markdown'] = 'rdiscount'
53
+ end
54
+
55
+ opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
56
+ options['permalink'] = style unless style.nil?
57
+ end
58
+
59
+ opts.on("--paginate [POSTS_PER_PAGE]", "Paginate a blog's posts") do |per_page|
60
+ begin
61
+ options['paginate'] = per_page.to_i
62
+ raise ArgumentError if options['paginate'] == 0
63
+ rescue
64
+ puts 'you must specify a number of posts by page bigger than 0'
65
+ exit 0
66
+ end
67
+ end
68
+
69
+ opts.on("--multiviews", "Don't use .html in links since Apache has 'Options +MultiViews'") do |style|
70
+ options['multiviews'] = true
71
+ end
72
+
73
+ opts.on("--sass", "Use Sass from haml gem for CSS generation") do
74
+ options['sass'] = true
75
+ end
76
+
77
+ opts.on("--haml", "Enable using Haml for posts and pages") do
78
+ options['haml'] = true
79
+ end
80
+
81
+ opts.on("--version", "Display current version") do
82
+ puts "Jekyll " + Jekyll.version
83
+ exit 0
84
+ end
85
+ end
86
+
87
+ # Read command line options into `options` hash
88
+ opts.parse!
89
+
90
+ # Get source and destintation from command line
91
+ case ARGV.size
92
+ when 0
93
+ when 1
94
+ options['destination'] = ARGV[0]
95
+ when 2
96
+ options['source'] = ARGV[0]
97
+ options['destination'] = ARGV[1]
98
+ else
99
+ puts "Invalid options. Run `jekyll --help` for assistance."
100
+ exit(1)
101
+ end
102
+
103
+ options = Jekyll.configuration(options)
104
+
105
+ # Get source and destination directories (possibly set by config file)
106
+ source = options['source']
107
+ destination = options['destination']
108
+
109
+ # Files to watch
110
+ def globs(source)
111
+ Dir.chdir(source) do
112
+ dirs = Dir['*'].select { |x| File.directory?(x) }
113
+ dirs -= ['_site']
114
+ dirs = dirs.map { |x| "#{x}/**/*" }
115
+ dirs += ['*']
116
+ end
117
+ end
118
+
119
+ # Create the Site
120
+ site = Jekyll::Site.new(options)
121
+
122
+ # Run the directory watcher for auto-generation, if required
123
+ if options['auto']
124
+ require 'directory_watcher'
125
+
126
+ puts "Auto-regenerating enabled: #{source} -> #{destination}"
127
+
128
+ dw = DirectoryWatcher.new(source)
129
+ dw.interval = 1
130
+ dw.glob = globs(source)
131
+
132
+ dw.add_observer do |*args|
133
+ t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
134
+ puts "[#{t}] regeneration: #{args.size} files changed"
135
+ site.process
136
+ end
137
+
138
+ dw.start
139
+
140
+ unless options['server']
141
+ loop { sleep 1000 }
142
+ end
143
+ else
144
+ puts "Building site: #{source} -> #{destination}"
145
+ site.process
146
+ puts "Successfully generated site: #{source} -> #{destination}"
147
+ end
148
+
149
+ # Run the server on the specified port, if required
150
+ if options['server']
151
+ require 'webrick'
152
+ include WEBrick
153
+
154
+ FileUtils.mkdir_p(destination)
155
+
156
+ s = HTTPServer.new(
157
+ :Port => options['server_port'],
158
+ :DocumentRoot => destination
159
+ )
160
+ t = Thread.new {
161
+ s.start
162
+ }
163
+
164
+ trap("INT") { s.shutdown }
165
+ t.join()
166
+ end
@@ -0,0 +1,57 @@
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 post:
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 include tag
41
+ Given I have a _includes directory
42
+ And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
43
+ And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
44
+ When I run jekyll
45
+ Then the _site directory should exist
46
+ And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
47
+
48
+ Scenario: Post with a more marker
49
+ Given I have a _posts directory
50
+ And I have a _layouts directory
51
+ And I have the following post:
52
+ | title | date | layout | content |
53
+ | Star Wars | 3/27/2009 | simple | Luke... <!-- more -->\nI am your father. |
54
+ And I have a simple layout that contains "Excerpt: {{ page.excerpt }}"
55
+ When I run jekyll
56
+ Then the _site directory should exist
57
+ And I should see "Excerpt: <p>Luke&#8230;</p>" in "_site/2009/03/27/star-wars.html"
@@ -0,0 +1,74 @@
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 "{{ site.posts.first.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 "{{ site.posts.first.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 "{{ site.posts.first.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
+
61
+ @dev
62
+ Scenario: Markdownize a given string
63
+ Given I have a _posts directory
64
+ And I have a _layouts directory
65
+ And I have the following post:
66
+ | title | date | layout | content |
67
+ | Star Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
68
+ And I have a default layout that contains "By {{ '*Obi-wan*' | markdownize }}"
69
+ When I run jekyll
70
+ Then the _site directory should exist
71
+ And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html"
72
+
73
+
74
+
@@ -0,0 +1,40 @@
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" file that contains "Basic Site"
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 play2. |
16
+ When I run jekyll
17
+ Then the _site/page2 directory should exist
18
+ And the _site/page2/index.html file should exist
19
+
20
+ 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
+
@@ -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"