jekyll 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (45) hide show
  1. checksums.yaml +15 -0
  2. data/History.markdown +29 -0
  3. data/bin/jekyll +14 -0
  4. data/jekyll.gemspec +29 -28
  5. data/lib/jekyll.rb +1 -1
  6. data/lib/jekyll/commands/doctor.rb +29 -0
  7. data/lib/jekyll/configuration.rb +13 -1
  8. data/lib/jekyll/converters/markdown/redcarpet_parser.rb +2 -2
  9. data/lib/jekyll/page.rb +17 -2
  10. data/lib/jekyll/post.rb +1 -1
  11. data/lib/jekyll/site.rb +14 -0
  12. data/site/_config.yml +1 -1
  13. data/site/_includes/primary-nav-items.html +2 -2
  14. data/site/{_posts/2012-07-01-configuration.md → docs/configuration.md} +3 -0
  15. data/site/{_posts/2012-07-01-contributing.md → docs/contributing.md} +1 -0
  16. data/site/{_posts/2012-07-01-deployment-methods.md → docs/deployment-methods.md} +1 -0
  17. data/site/docs/extras.md +35 -0
  18. data/site/{_posts/2012-07-01-frontmatter.md → docs/frontmatter.md} +1 -0
  19. data/site/{_posts/2012-07-01-github-pages.md → docs/github-pages.md} +1 -0
  20. data/site/{_posts/2012-07-01-heroku.md → docs/heroku.md} +1 -0
  21. data/site/{_posts/2012-07-01-home.md → docs/index.md} +3 -1
  22. data/site/{_posts/2012-07-01-installation.md → docs/installation.md} +1 -0
  23. data/site/{_posts/2012-07-01-migrations.md → docs/migrations.md} +1 -0
  24. data/site/{_posts/2012-07-01-pages.md → docs/pages.md} +1 -0
  25. data/site/{_posts/2012-07-01-pagination.md → docs/pagination.md} +1 -0
  26. data/site/{_posts/2012-07-01-permalinks.md → docs/permalinks.md} +1 -0
  27. data/site/{_posts/2012-07-01-plugins.md → docs/plugins.md} +1 -0
  28. data/site/{_posts/2012-07-01-posts.md → docs/posts.md} +2 -1
  29. data/site/{_posts/2012-07-01-resources.md → docs/resources.md} +1 -0
  30. data/site/{_posts/2012-07-01-sites.md → docs/sites.md} +1 -0
  31. data/site/{_posts/2012-07-01-structure.md → docs/structure.md} +1 -0
  32. data/site/{_posts/2012-07-01-templates.md → docs/templates.md} +2 -1
  33. data/site/{_posts/2012-07-01-troubleshooting.md → docs/troubleshooting.md} +1 -0
  34. data/site/{_posts/2012-07-01-upgrading.md → docs/upgrading.md} +22 -1
  35. data/site/{_posts/2012-07-01-usage.md → docs/usage.md} +1 -0
  36. data/site/{_posts/2012-07-01-variables.md → docs/variables.md} +1 -0
  37. data/site/index.html +4 -4
  38. data/test/source/_posts/2013-05-10-number-category.textile +7 -0
  39. data/test/test_generated_site.rb +1 -1
  40. data/test/test_post.rb +6 -0
  41. data/test/test_redcarpet.rb +3 -3
  42. data/test/test_site.rb +1 -1
  43. metadata +33 -76
  44. data/site/_posts/2012-07-01-extras.md +0 -114
  45. data/site/docs/index.html +0 -11
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDFjMjNlNTk3YTMzYjA1NzM5ZDc2N2Q3OGQyMzRhMzM5YTdkMjljMg==
5
+ data.tar.gz: !binary |-
6
+ Y2YzY2UwMjI1ZjViMGIzOGZhYThmYWZhY2E1ZjQ4YzBhZDIzMDk0OQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NDQ3MzU3ZTVmMzM5MDRlNmEzMTg5NjYyZDc2MDJjZGYyMjVjZDIwN2M5N2Fi
10
+ Yjc0ZmZmYTAwMWIxYjdhMzkzYjYxMjdjYzU0NjI4N2Q3NjY1MWQ2MGJlM2Zk
11
+ MWEyOWY5MTY5ZTU0ZTNmMGRmNDBkNzhmNTliZTFhY2NiYTZiMmI=
12
+ data.tar.gz: !binary |-
13
+ ZWUyNmU3YWEyNGY0ZjhlZmE5ZTU0NWVjOTA5NDk5NmUzY2U3Y2E2OGI3ZTA2
14
+ ODA0NGQ4NDRkZDZkNDc0ODkwN2RiZjQxOTQwNjhjZTFkOWY5YzM0YjJiMDg3
15
+ YmUzZjJlZmMwN2E4MzQ2ODQzMDUyODZkOGYxYTI1NjNmOWZlYjE=
@@ -1,5 +1,34 @@
1
1
  ## HEAD
2
2
  ### Major Enhancements
3
+ ### Minor Enhancements
4
+ ### Bug Fixes
5
+ ### Site Enhancements
6
+ ### Development Fixes
7
+
8
+ ## 1.0.2 / 2013-05-12
9
+
10
+ ### Major Enhancements
11
+ * Add `jekyll doctor` command to check site for any known compatibility problems (#1081)
12
+ * Backwards-compatibilize relative permalinks (#1081)
13
+
14
+ ### Minor Enhancements
15
+ * Add a `data-lang="<lang>"` attribute to Redcarpet code blocks (#1066)
16
+ * Deprecate old config `server_port`, match to `port` if `port` isn't set (#1084)
17
+ * Update pygments.rb version to 0.5.0 (#1061)
18
+ * Update Kramdown version to 1.0.2 (#1067)
19
+
20
+ ### Bug Fixes
21
+ * Fix issue when categories are numbers (#1078)
22
+ * Catching that Redcarpet gem isn't installed (#1059)
23
+
24
+ ### Site Enhancements
25
+ * Add documentation about `relative_permalinks` (#1081)
26
+ * Remove pygments-installation instructions, as pygments.rb is bundled with it (#1079)
27
+ * Move pages to be Pages for realz (#985)
28
+ * Updated links to Liquid documentation (#1073)
29
+
30
+ ## 1.0.1 / 2013-05-08
31
+
3
32
  ### Minor Enhancements
4
33
  * Do not force use of toc_token when using generate_tok in RDiscount (#1048)
5
34
  * Add newer `language-` class name prefix to code blocks (#1037)
data/bin/jekyll CHANGED
@@ -86,6 +86,20 @@ command :serve do |c|
86
86
  end
87
87
  alias_command :server, :serve
88
88
 
89
+ command :doctor do |c|
90
+ c.syntax = 'jekyll doctor'
91
+ c.description = 'Search site and print specific deprecation warnings'
92
+
93
+ c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
94
+
95
+ c.action do |args, options|
96
+ options = normalize_options(options.__hash__)
97
+ options = Jekyll.configuration(options)
98
+ Jekyll::Commands::Doctor.process(options)
99
+ end
100
+ end
101
+ alias_command :hyde, :doctor
102
+
89
103
  command :import do |c|
90
104
  c.syntax = 'jekyll import <platform> [options]'
91
105
  c.description = 'Import your old blog to Jekyll'
@@ -4,9 +4,9 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'jekyll'
7
- s.version = '1.0.1'
7
+ s.version = '1.0.2'
8
8
  s.license = 'MIT'
9
- s.date = '2013-05-08'
9
+ s.date = '2013-05-12'
10
10
  s.rubyforge_project = 'jekyll'
11
11
 
12
12
  s.summary = "A simple, blog aware, static site generator."
@@ -27,8 +27,8 @@ Gem::Specification.new do |s|
27
27
  s.add_runtime_dependency('classifier', "~> 1.3")
28
28
  s.add_runtime_dependency('directory_watcher', "~> 1.4.1")
29
29
  s.add_runtime_dependency('maruku', "~> 0.5")
30
- s.add_runtime_dependency('kramdown', "~> 0.14")
31
- s.add_runtime_dependency('pygments.rb', "~> 0.4.2")
30
+ s.add_runtime_dependency('kramdown', "~> 1.0.2")
31
+ s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
32
32
  s.add_runtime_dependency('commander', "~> 4.1.3")
33
33
  s.add_runtime_dependency('safe_yaml', "~> 0.7.0")
34
34
  s.add_runtime_dependency('colorator', "~> 0.1")
@@ -71,6 +71,7 @@ Gem::Specification.new do |s|
71
71
  lib/jekyll.rb
72
72
  lib/jekyll/command.rb
73
73
  lib/jekyll/commands/build.rb
74
+ lib/jekyll/commands/doctor.rb
74
75
  lib/jekyll/commands/new.rb
75
76
  lib/jekyll/commands/serve.rb
76
77
  lib/jekyll/configuration.rb
@@ -125,34 +126,33 @@ Gem::Specification.new do |s|
125
126
  site/_includes/top.html
126
127
  site/_layouts/default.html
127
128
  site/_layouts/docs.html
128
- site/_posts/2012-07-01-configuration.md
129
- site/_posts/2012-07-01-contributing.md
130
- site/_posts/2012-07-01-deployment-methods.md
131
- site/_posts/2012-07-01-extras.md
132
- site/_posts/2012-07-01-frontmatter.md
133
- site/_posts/2012-07-01-github-pages.md
134
- site/_posts/2012-07-01-heroku.md
135
- site/_posts/2012-07-01-home.md
136
- site/_posts/2012-07-01-installation.md
137
- site/_posts/2012-07-01-migrations.md
138
- site/_posts/2012-07-01-pages.md
139
- site/_posts/2012-07-01-pagination.md
140
- site/_posts/2012-07-01-permalinks.md
141
- site/_posts/2012-07-01-plugins.md
142
- site/_posts/2012-07-01-posts.md
143
- site/_posts/2012-07-01-resources.md
144
- site/_posts/2012-07-01-sites.md
145
- site/_posts/2012-07-01-structure.md
146
- site/_posts/2012-07-01-templates.md
147
- site/_posts/2012-07-01-troubleshooting.md
148
- site/_posts/2012-07-01-upgrading.md
149
- site/_posts/2012-07-01-usage.md
150
- site/_posts/2012-07-01-variables.md
151
129
  site/css/gridism.css
152
130
  site/css/normalize.css
153
131
  site/css/pygments.css
154
132
  site/css/style.css
155
- site/docs/index.html
133
+ site/docs/configuration.md
134
+ site/docs/contributing.md
135
+ site/docs/deployment-methods.md
136
+ site/docs/extras.md
137
+ site/docs/frontmatter.md
138
+ site/docs/github-pages.md
139
+ site/docs/heroku.md
140
+ site/docs/index.md
141
+ site/docs/installation.md
142
+ site/docs/migrations.md
143
+ site/docs/pages.md
144
+ site/docs/pagination.md
145
+ site/docs/permalinks.md
146
+ site/docs/plugins.md
147
+ site/docs/posts.md
148
+ site/docs/resources.md
149
+ site/docs/sites.md
150
+ site/docs/structure.md
151
+ site/docs/templates.md
152
+ site/docs/troubleshooting.md
153
+ site/docs/upgrading.md
154
+ site/docs/usage.md
155
+ site/docs/variables.md
156
156
  site/favicon.png
157
157
  site/img/article-footer.png
158
158
  site/img/footer-arrow.png
@@ -204,6 +204,7 @@ Gem::Specification.new do |s|
204
204
  test/source/_posts/2013-01-12-no-layout.textile
205
205
  test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
206
206
  test/source/_posts/2013-04-11-custom-excerpt.markdown
207
+ test/source/_posts/2013-05-10-number-category.textile
207
208
  test/source/_posts/es/2008-11-21-nested.textile
208
209
  test/source/about.html
209
210
  test/source/category/_posts/2008-9-23-categories.textile
@@ -56,7 +56,7 @@ require_all 'jekyll/tags'
56
56
  SafeYAML::OPTIONS[:suppress_warnings] = true
57
57
 
58
58
  module Jekyll
59
- VERSION = '1.0.1'
59
+ VERSION = '1.0.2'
60
60
 
61
61
  # Public: Generate a Jekyll configuration Hash by merging the default
62
62
  # options with anything in _config.yml, and adding the given options on top.
@@ -0,0 +1,29 @@
1
+ module Jekyll
2
+ module Commands
3
+ class Doctor < Command
4
+ class << self
5
+ def process(options)
6
+ site = Jekyll::Site.new(options)
7
+ site.read
8
+
9
+ unless deprecated_relative_permalinks(site)
10
+ Jekyll::Logger.info "Your test results", "are in. Everything looks fine."
11
+ end
12
+ end
13
+
14
+ def deprecated_relative_permalinks(site)
15
+ contains_deprecated_pages = false
16
+ site.pages.each do |page|
17
+ if page.uses_relative_permalinks
18
+ Jekyll::Logger.warn "Deprecation:", "'#{page.path}' uses relative" +
19
+ " permalinks which will be deprecated in" +
20
+ " Jekyll v1.1 and beyond."
21
+ contains_deprecated_pages = true
22
+ end
23
+ end
24
+ contains_deprecated_pages
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -19,7 +19,10 @@ module Jekyll
19
19
  'limit_posts' => 0,
20
20
  'lsi' => false,
21
21
  'future' => true, # remove and make true just default
22
- 'pygments' => true, # remove and make true just default
22
+ 'pygments' => true,
23
+
24
+ 'relative_permalinks' => true, # backwards-compatibility with < 1.0
25
+ # will be set to false once 1.1 hits
23
26
 
24
27
  'markdown' => 'maruku',
25
28
  'permalink' => 'date',
@@ -164,6 +167,15 @@ module Jekyll
164
167
  config.delete('server')
165
168
  end
166
169
 
170
+ if config.has_key? 'server_port'
171
+ Jekyll::Logger.warn "Deprecation:", "The 'server_port' configuration option" +
172
+ " has been renamed to 'port'. Please update your config" +
173
+ " file accordingly."
174
+ # copy but don't overwrite:
175
+ config['port'] = config['server_port'] unless config.has_key?('port')
176
+ config.delete('server_port')
177
+ end
178
+
167
179
  config
168
180
  end
169
181
 
@@ -5,7 +5,7 @@ module Jekyll
5
5
 
6
6
  module CommonMethods
7
7
  def add_code_tags(code, lang)
8
- code = code.sub(/<pre>/, "<pre><code class=\"#{lang} language-#{lang}\">")
8
+ code = code.sub(/<pre>/, "<pre><code class=\"#{lang} language-#{lang}\" data-lang=\"#{lang}\">")
9
9
  code = code.sub(/<\/pre>/,"</code></pre>")
10
10
  end
11
11
  end
@@ -52,7 +52,7 @@ module Jekyll
52
52
  include WithoutPygments
53
53
  end
54
54
  end
55
- rescue LoadErro
55
+ rescue LoadError
56
56
  STDERR.puts 'You are missing a library required for Markdown. Please run:'
57
57
  STDERR.puts ' $ [sudo] gem install redcarpet'
58
58
  raise FatalException.new("Missing dependency: redcarpet")
@@ -64,7 +64,11 @@ module Jekyll
64
64
  return @url if @url
65
65
 
66
66
  url = if permalink
67
- permalink
67
+ if site.config['relative_permalinks']
68
+ File.join(@dir, permalink)
69
+ else
70
+ permalink
71
+ end
68
72
  else
69
73
  {
70
74
  "path" => @dir,
@@ -114,7 +118,14 @@ module Jekyll
114
118
  self.data.deep_merge({
115
119
  "url" => self.url,
116
120
  "content" => self.content,
117
- "path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') })
121
+ "path" => self.data['path'] || path })
122
+ end
123
+
124
+ # The path to the source file
125
+ #
126
+ # Returns the path to the source file
127
+ def path
128
+ File.join(@dir, @name).sub(/\A\//, '')
118
129
  end
119
130
 
120
131
  # Obtain destination path.
@@ -144,5 +155,9 @@ module Jekyll
144
155
  def index?
145
156
  basename == 'index'
146
157
  end
158
+
159
+ def uses_relative_permalinks
160
+ permalink && @dir != "" && site.config['relative_permalinks']
161
+ end
147
162
  end
148
163
  end
@@ -76,7 +76,7 @@ module Jekyll
76
76
 
77
77
  def populate_categories
78
78
  if self.categories.empty?
79
- self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase}
79
+ self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase}
80
80
  end
81
81
  self.categories.flatten!
82
82
  end
@@ -231,6 +231,7 @@ module Jekyll
231
231
  end
232
232
 
233
233
  self.pages.each do |page|
234
+ relative_permalinks_deprecation_method if page.uses_relative_permalinks
234
235
  page.render(self.layouts, payload)
235
236
  end
236
237
 
@@ -418,5 +419,18 @@ module Jekyll
418
419
  post.categories.each { |c| self.categories[c] << post }
419
420
  post.tags.each { |c| self.tags[c] << post }
420
421
  end
422
+
423
+ def relative_permalinks_deprecation_method
424
+ if config['relative_permalinks'] && !@deprecated_relative_permalinks
425
+ $stderr.puts # Places newline after "Generating..."
426
+ Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" +
427
+ " in subfolders must be relative to the" +
428
+ " site source directory, not the parent" +
429
+ " directory. Check http://jekyllrb.com/docs/upgrading/"+
430
+ " for more info."
431
+ $stderr.print Jekyll::Logger.formatted_topic("") + "..." # for "done."
432
+ @deprecated_relative_permalinks = true
433
+ end
434
+ end
421
435
  end
422
436
  end
@@ -1,3 +1,3 @@
1
- permalink: /docs/:categories/:title
2
1
  pygments: true
2
+ relative_permalinks: false
3
3
  gauges_id: 503c5af6613f5d0f19000027
@@ -3,9 +3,9 @@
3
3
  <a href="{{ site.url }}/">Overview</a>
4
4
  </li>
5
5
  <li class="{% unless page.overview %}current{% endunless %}">
6
- <a href="{{ site.url }}/docs">Doc<span class="show-on-mobiles">s</span><span class="hide-on-mobiles">umentation</span></a>
6
+ <a href="{{ site.url }}/docs/home">Doc<span class="show-on-mobiles">s</span><span class="hide-on-mobiles">umentation</span></a>
7
7
  </li>
8
8
  <li class="">
9
9
  <a href="https://github.com/mojombo/jekyll"><span class="hide-on-mobiles">View on </span>GitHub</a>
10
10
  </li>
11
- </ul>
11
+ </ul>
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: Configuration
4
4
  prev_section: structure
5
5
  next_section: frontmatter
6
+ permalink: /docs/configuration/
6
7
  ---
7
8
 
8
9
  Jekyll allows you to concoct your sites in any way you can dream up, and it’s
@@ -252,6 +253,8 @@ show_drafts: nil
252
253
  limit_posts: 0
253
254
  pygments: true
254
255
 
256
+ relative_permalinks: true
257
+
255
258
  permalink: date
256
259
  paginate_path: 'page:num'
257
260
 
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: Contributing
4
4
  prev_section: deployment-methods
5
5
  next_section: troubleshooting
6
+ permalink: /docs/contributing/
6
7
  ---
7
8
 
8
9
  So you've got an awesome idea to throw into Jekyll. Great! Please keep the
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: Deployment methods
4
4
  prev_section: github-pages
5
5
  next_section: contributing
6
+ permalink: /docs/deployment-methods/
6
7
  ---
7
8
 
8
9
  Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. A few of the most common deployment techniques are described below.
@@ -0,0 +1,35 @@
1
+ ---
2
+ layout: docs
3
+ title: Extras
4
+ prev_section: plugins
5
+ next_section: github-pages
6
+ permalink: /docs/extras/
7
+ ---
8
+
9
+ There are a number of (optional) extra features that Jekyll supports that you
10
+ may want to install, depending on how you plan to use Jekyll.
11
+
12
+ ## LaTeX Support
13
+
14
+ Maruku comes with optional support for LaTeX to PNG rendering via blahtex
15
+ (Version 0.6) which must be in your `$PATH` along with `dvips`. If you need
16
+ Maruku to not assume a fixed location for `dvips`, check out [Remi’s Maruku
17
+ fork](http://github.com/remi/maruku).
18
+
19
+ ## RDiscount
20
+
21
+ If you prefer to use [RDiscount](http://github.com/rtomayko/rdiscount) instead
22
+ of [Maruku](http://maruku.rubyforge.org/) for markdown, just make sure you have
23
+ it installed:
24
+
25
+ {% highlight bash %}
26
+ $ sudo gem install rdiscount
27
+ {% endhighlight %}
28
+
29
+ And then specify RDiscount as the Markdown engine in your `_config.yml` file to
30
+ have Jekyll run with that option.
31
+
32
+ {% highlight bash %}
33
+ # In _config.yml
34
+ markdown: rdiscount
35
+ {% endhighlight %}
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: Front-matter
4
4
  prev_section: configuration
5
5
  next_section: posts
6
+ permalink: /docs/frontmatter/
6
7
  ---
7
8
 
8
9
  The front-matter is where Jekyll starts to get really cool. Any file that
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: GitHub Pages
4
4
  prev_section: extras
5
5
  next_section: deployment-methods
6
+ permalink: /docs/github-pages/
6
7
  ---
7
8
 
8
9
  [GitHub Pages](http://pages.github.com) are public web pages for users,
@@ -3,6 +3,7 @@ layout: docs
3
3
  title: Heroku
4
4
  prev_section: github-pages
5
5
  next_section: manual-deployment
6
+ permalink: /docs/heroku/
6
7
  ---
7
8
 
8
9
  Move along, people. Nothing to see here.