tekin-jekyll 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/.gitignore +6 -0
  2. data/History.txt +143 -0
  3. data/README.textile +42 -0
  4. data/Rakefile +91 -0
  5. data/VERSION.yml +4 -0
  6. data/bin/jekyll +150 -0
  7. data/features/create_sites.feature +46 -0
  8. data/features/embed_filters.feature +60 -0
  9. data/features/pagination.feature +40 -0
  10. data/features/permalinks.feature +63 -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/jekyll.gemspec +134 -0
  17. data/lib/jekyll.rb +86 -0
  18. data/lib/jekyll/albino.rb +122 -0
  19. data/lib/jekyll/converters/csv.rb +26 -0
  20. data/lib/jekyll/converters/mephisto.rb +79 -0
  21. data/lib/jekyll/converters/mt.rb +59 -0
  22. data/lib/jekyll/converters/textpattern.rb +50 -0
  23. data/lib/jekyll/converters/typo.rb +49 -0
  24. data/lib/jekyll/converters/wordpress.rb +54 -0
  25. data/lib/jekyll/convertible.rb +84 -0
  26. data/lib/jekyll/core_ext.rb +30 -0
  27. data/lib/jekyll/filters.rb +51 -0
  28. data/lib/jekyll/layout.rb +36 -0
  29. data/lib/jekyll/page.rb +112 -0
  30. data/lib/jekyll/pager.rb +45 -0
  31. data/lib/jekyll/post.rb +251 -0
  32. data/lib/jekyll/site.rb +266 -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/about.html +6 -0
  54. data/test/source/category/_posts/2008-9-23-categories.textile +6 -0
  55. data/test/source/contacts.html +5 -0
  56. data/test/source/css/screen.css +76 -0
  57. data/test/source/foo/_posts/bar/2008-12-12-topical-post.textile +8 -0
  58. data/test/source/index.html +22 -0
  59. data/test/source/win/_posts/2009-05-24-yaml-linebreak.markdown +7 -0
  60. data/test/source/z_category/_posts/2008-9-23-categories.textile +6 -0
  61. data/test/suite.rb +9 -0
  62. data/test/test_configuration.rb +29 -0
  63. data/test/test_filters.rb +49 -0
  64. data/test/test_generated_site.rb +40 -0
  65. data/test/test_page.rb +87 -0
  66. data/test/test_pager.rb +47 -0
  67. data/test/test_post.rb +302 -0
  68. data/test/test_site.rb +85 -0
  69. data/test/test_tags.rb +116 -0
  70. metadata +189 -0
@@ -0,0 +1,6 @@
1
+ test/dest
2
+ *.gem
3
+ pkg/
4
+ *.swp
5
+ *~
6
+ _site/
@@ -0,0 +1,143 @@
1
+ == 0.5.2 / 2009-06-24
2
+ * Enhancements
3
+ * Added --paginate option to the executable along with a paginator object for the payload [github.com/calavera]
4
+ * Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once again.
5
+ * Configuration options set in config.yml are now available through the site payload [github.com/vilcans]
6
+ * Posts can now have an empty YAML front matter or none at all [github.com/bahuvrihi]
7
+ * Bug Fixes
8
+ * Fixing Ruby 1.9 issue that requires to_s on the err object [github.com/Chrononaut]
9
+ * Fixes for pagination and ordering posts on the same day [github.com/ujh]
10
+ * Made pages respect permalinks style and permalinks in yml front matter [github.com/eugenebolshakov]
11
+ * Index.html file should always have index.html permalink [github.com/eugenebolshakov]
12
+ * Added trailing slash to pretty permalink style so Apache is happy [github.com/eugenebolshakov]
13
+ * Bad markdown processor in config fails sooner and with better message [github.com/gcnovus]
14
+ * Allow CRLFs in yaml frontmatter [github.com/juretta]
15
+ * Added Date#xmlschema for Ruby versions < 1.9
16
+
17
+ == 0.5.1 / 2009-05-06
18
+ * Major Enhancements
19
+ * Next/previous posts in site payload [github.com/pantulis, github.com/tomo]
20
+ * Permalink templating system
21
+ * Moved most of the README out to the GitHub wiki
22
+ * Exclude option in configuration so specified files won't be brought over with generated site [github.com/duritong]
23
+ * Bug Fixes
24
+ * Making sure config.yaml references are all gone, using only config.yml
25
+ * Fixed syntax highlighting breaking for UTF-8 code [github.com/henrik]
26
+ * Worked around RDiscount bug that prevents Markdown from getting parsed after highlight [github.com/henrik]
27
+ * CGI escaped post titles [github.com/Chrononaut]
28
+
29
+ == 0.5.0 / 2009-04-07
30
+ * Minor Enhancements
31
+ * Ability to set post categories via YAML [github.com/qrush]
32
+ * Ability to set prevent a post from publishing via YAML [github.com/qrush]
33
+ * Add textilize filter [github.com/willcodeforfoo]
34
+ * Add 'pretty' permalink style for wordpress-like urls [github.com/dysinger]
35
+ * Made it possible to enter categories from YAML as an array [github.com/Chrononaut]
36
+ * Ignore Emacs autosave files [github.com/Chrononaut]
37
+ * Bug Fixes
38
+ * Use block syntax of popen4 to ensure that subprocesses are properly disposed [github.com/jqr]
39
+ * Close open4 streams to prevent zombies [github.com/rtomayko]
40
+ * Only query required fields from the WP Database [github.com/ariejan]
41
+ * Prevent _posts from being copied to the destination directory [github.com/bdimcheff]
42
+ * Refactors
43
+ * Factored the filtering code into a method [github.com/Chrononaut]
44
+ * Fix tests and convert to Shoulda [github.com/qrush, github.com/technicalpickles]
45
+ * Add Cucumber acceptance test suite [github.com/qrush, github.com/technicalpickles]
46
+
47
+ == 0.4.1
48
+ * Minor Enhancements
49
+ * Changed date format on wordpress converter (zeropadding) [github.com/dysinger]
50
+ * Bug Fixes
51
+ * Add jekyll binary as executable to gemspec [github.com/dysinger]
52
+
53
+ == 0.4.0 / 2009-02-03
54
+ * Major Enhancements
55
+ * Switch to Jeweler for packaging tasks
56
+ * Minor Enhancements
57
+ * Type importer [github.com/codeslinger]
58
+ * site.topics accessor [github.com/baz]
59
+ * Add array_to_sentence_string filter [github.com/mchung]
60
+ * Add a converter for textpattern [github.com/PerfectlyNormal]
61
+ * Add a working Mephisto / MySQL converter [github.com/ivey]
62
+ * Allowing .htaccess files to be copied over into the generated site [github.com/briandoll]
63
+ * Add option to not put file date in permalink URL [github.com/mreid]
64
+ * Add line number capabilities to highlight blocks [github.com/jcon]
65
+ * Bug Fixes
66
+ * Fix permalink behavior [github.com/cavalle]
67
+ * Fixed an issue with pygments, markdown, and newlines [github.com/zpinter]
68
+ * Ampersands need to be escaped [github.com/pufuwozu, github.com/ap]
69
+ * Test and fix the site.categories hash [github.com/zzot]
70
+ * Fix site payload available to files [github.com/matrix9180]
71
+
72
+ == 0.3.0 / 2008-12-24
73
+ * Major Enhancements
74
+ * Added --server option to start a simple WEBrick server on destination directory [github.com/johnreilly and github.com/mchung]
75
+ * Minor Enhancements
76
+ * Added post categories based on directories containing _posts [github.com/mreid]
77
+ * Added post topics based on directories underneath _posts
78
+ * Added new date filter that shows the full month name [github.com/mreid]
79
+ * Merge Post's YAML front matter into its to_liquid payload [github.com/remi]
80
+ * Restrict includes to regular files underneath _includes
81
+ * Bug Fixes
82
+ * Change YAML delimiter matcher so as to not chew up 2nd level markdown headers [github.com/mreid]
83
+ * Fix bug that meant page data (such as the date) was not available in templates [github.com/mreid]
84
+ * Properly reject directories in _layouts
85
+
86
+ == 0.2.1 / 2008-12-15
87
+ * Major Changes
88
+ * Use Maruku (pure Ruby) for Markdown by default [github.com/mreid]
89
+ * Allow use of RDiscount with --rdiscount flag
90
+ * Minor Enhancements
91
+ * Don't load directory_watcher unless it's needed [github.com/pjhyett]
92
+
93
+ == 0.2.0 / 2008-12-14
94
+ * Major Changes
95
+ * related_posts is now found in site.related_posts
96
+
97
+ == 0.1.6 / 2008-12-13
98
+ * Major Features
99
+ * Include files in _includes with {% include x.textile %}
100
+
101
+ == 0.1.5 / 2008-12-12
102
+ * Major Features
103
+ * Code highlighting with Pygments if --pygments is specified
104
+ * Disable true LSI by default, enable with --lsi
105
+ * Minor Enhancements
106
+ * Output informative message if RDiscount is not available [github.com/JackDanger]
107
+ * Bug Fixes
108
+ * Prevent Jekyll from picking up the output directory as a source [github.com/JackDanger]
109
+ * Skip related_posts when there is only one post [github.com/JackDanger]
110
+
111
+ == 0.1.4 / 2008-12-08
112
+ * Bug Fixes
113
+ * DATA does not work properly with rubygems
114
+
115
+ == 0.1.3 / 2008-12-06
116
+ * Major Features
117
+ * Markdown support [github.com/vanpelt]
118
+ * Mephisto and CSV converters [github.com/vanpelt]
119
+ * Code hilighting [github.com/vanpelt]
120
+ * Autobuild
121
+ * Bug Fixes
122
+ * Accept both \r\n and \n in YAML header [github.com/vanpelt]
123
+
124
+ == 0.1.2 / 2008-11-22
125
+ * Major Features
126
+ * Add a real "related posts" implementation using Classifier
127
+ * Command Line Changes
128
+ * Allow cli to be called with 0, 1, or 2 args intuiting dir paths
129
+ if they are omitted
130
+
131
+ == 0.1.1 / 2008-11-22
132
+ * Minor Additions
133
+ * Posts now support introspectional data e.g. {{ page.url }}
134
+
135
+ == 0.1.0 / 2008-11-05
136
+ * First release
137
+ * Converts posts written in Textile
138
+ * Converts regular site pages
139
+ * Simple copy of binary files
140
+
141
+ == 0.0.0 / 2008-10-19
142
+ * Birthday!
143
+
@@ -0,0 +1,42 @@
1
+ h1. Jekyll
2
+
3
+ By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
4
+
5
+ Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind "GitHub Pages":http://pages.github.com, which you can use to host your project's page or blog right here from GitHub.
6
+
7
+ h2. Getting Started
8
+
9
+ * "Install":http://wiki.github.com/mojombo/jekyll/install the gem
10
+ * Read up about its "Usage":http://wiki.github.com/mojombo/jekyll/usage and "Configuration":http://wiki.github.com/mojombo/jekyll/configuration
11
+ * Take a gander at some existing "Sites":http://wiki.github.com/mojombo/jekyll/sites
12
+ * Fork and "Contribute":http://wiki.github.com/mojombo/jekyll/contribute your own modifications
13
+ * Have questions? Post them on the "Mailing List":http://groups.google.com/group/jekyll-rb
14
+
15
+ h2. Diving In
16
+
17
+ * "Migrate":http://wiki.github.com/mojombo/jekyll/blog-migrations from your previous system
18
+ * Learn how the "YAML Front Matter":http://wiki.github.com/mojombo/jekyll/yaml-front-matter works
19
+ * Put information on your site with "Template Data":http://wiki.github.com/mojombo/jekyll/template-data
20
+ * Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
21
+ * Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
22
+
23
+ h2. Dependencies
24
+
25
+ * RedCloth: Textile support
26
+ * Liquid: Templating system
27
+ * Classifier: Generating related posts
28
+ * Maruku: Default markdown engine
29
+ * Directory Watcher: Auto-regeneration of sites
30
+ * Open4: Talking to pygments for syntax highlighting
31
+
32
+ h2. License
33
+
34
+ (The MIT License)
35
+
36
+ Copyright (c) 2008 Tom Preston-Werner
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -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 = "jekyll"
10
+ s.summary = %Q{Jekyll is a simple, blog aware, static site generator.}
11
+ s.email = "tom@mojombo.com"
12
+ s.homepage = "http://github.com/mojombo/jekyll"
13
+ s.description = "Jekyll is a simple, blog aware, static site generator."
14
+ s.authors = ["Tom Preston-Werner"]
15
+ s.rubyforge_project = "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
@@ -0,0 +1,4 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 5
4
+ :patch: 2
@@ -0,0 +1,150 @@
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("--rdiscount", "Use rdiscount gem for Markdown") do
48
+ options['markdown'] = 'rdiscount'
49
+ end
50
+
51
+ opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
52
+ options['permalink'] = style unless style.nil?
53
+ end
54
+
55
+ opts.on("--paginate [POSTS_PER_PAGE]", "Paginate a blog's posts") do |per_page|
56
+ begin
57
+ options['paginate'] = per_page.to_i
58
+ raise ArgumentError if options['paginate'] == 0
59
+ rescue
60
+ puts 'you must specify a number of posts by page bigger than 0'
61
+ exit 0
62
+ end
63
+ end
64
+
65
+ opts.on("--version", "Display current version") do
66
+ puts "Jekyll " + Jekyll.version
67
+ exit 0
68
+ end
69
+ end
70
+
71
+ # Read command line options into `options` hash
72
+ opts.parse!
73
+
74
+ # Get source and destintation from command line
75
+ case ARGV.size
76
+ when 0
77
+ when 1
78
+ options['destination'] = ARGV[0]
79
+ when 2
80
+ options['source'] = ARGV[0]
81
+ options['destination'] = ARGV[1]
82
+ else
83
+ puts "Invalid options. Run `jekyll --help` for assistance."
84
+ exit(1)
85
+ end
86
+
87
+ options = Jekyll.configuration(options)
88
+
89
+ # Get source and destination directories (possibly set by config file)
90
+ source = options['source']
91
+ destination = options['destination']
92
+
93
+ # Files to watch
94
+ def globs(source)
95
+ Dir.chdir(source) do
96
+ dirs = Dir['*'].select { |x| File.directory?(x) }
97
+ dirs -= ['_site']
98
+ dirs = dirs.map { |x| "#{x}/**/*" }
99
+ dirs += ['*']
100
+ end
101
+ end
102
+
103
+ # Create the Site
104
+ site = Jekyll::Site.new(options)
105
+
106
+ # Run the directory watcher for auto-generation, if required
107
+ if options['auto']
108
+ require 'directory_watcher'
109
+
110
+ puts "Auto-regenerating enabled: #{source} -> #{destination}"
111
+
112
+ dw = DirectoryWatcher.new(source)
113
+ dw.interval = 1
114
+ dw.glob = globs(source)
115
+
116
+ dw.add_observer do |*args|
117
+ t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
118
+ puts "[#{t}] regeneration: #{args.size} files changed"
119
+ site.process
120
+ end
121
+
122
+ dw.start
123
+
124
+ unless options['server']
125
+ loop { sleep 1000 }
126
+ end
127
+ else
128
+ puts "Building site: #{source} -> #{destination}"
129
+ site.process
130
+ puts "Successfully generated site: #{source} -> #{destination}"
131
+ end
132
+
133
+ # Run the server on the specified port, if required
134
+ if options['server']
135
+ require 'webrick'
136
+ include WEBrick
137
+
138
+ FileUtils.mkdir_p(destination)
139
+
140
+ s = HTTPServer.new(
141
+ :Port => options['server_port'],
142
+ :DocumentRoot => destination
143
+ )
144
+ t = Thread.new {
145
+ s.start
146
+ }
147
+
148
+ trap("INT") { s.shutdown }
149
+ t.join()
150
+ end
@@ -0,0 +1,46 @@
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"