jekyll 2.0.0.alpha.1 → 2.0.0.alpha.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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +15 -0
  3. data/.travis.yml +27 -0
  4. data/History.markdown +66 -1
  5. data/LICENSE +2 -2
  6. data/README.markdown +2 -2
  7. data/Rakefile +4 -44
  8. data/bin/jekyll +10 -113
  9. data/docs/jp/CONTRIBUTING.jp.markdown +93 -0
  10. data/docs/jp/README.jp.markdown +69 -0
  11. data/features/create_sites.feature +12 -12
  12. data/features/drafts.feature +23 -2
  13. data/features/embed_filters.feature +7 -5
  14. data/features/include_tag.feature +7 -7
  15. data/features/markdown.feature +4 -4
  16. data/features/pagination.feature +2 -2
  17. data/features/permalinks.feature +7 -7
  18. data/features/post_data.feature +21 -21
  19. data/features/post_excerpts.feature +6 -6
  20. data/features/site_configuration.feature +17 -17
  21. data/features/site_data.feature +15 -15
  22. data/features/step_definitions/jekyll_steps.rb +4 -4
  23. data/features/support/env.rb +2 -2
  24. data/jekyll.gemspec +17 -284
  25. data/lib/jekyll.rb +21 -5
  26. data/lib/jekyll/command.rb +72 -20
  27. data/lib/jekyll/commands/build.rb +82 -58
  28. data/lib/jekyll/commands/docs.rb +30 -0
  29. data/lib/jekyll/commands/doctor.rb +18 -1
  30. data/lib/jekyll/commands/new.rb +19 -6
  31. data/lib/jekyll/commands/serve.rb +80 -49
  32. data/lib/jekyll/configuration.rb +3 -3
  33. data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
  34. data/lib/jekyll/converters/markdown/redcarpet_parser.rb +1 -0
  35. data/lib/jekyll/convertible.rb +19 -21
  36. data/lib/jekyll/draft.rb +5 -0
  37. data/lib/jekyll/excerpt.rb +5 -5
  38. data/lib/jekyll/layout.rb +2 -2
  39. data/lib/jekyll/layout_reader.rb +15 -2
  40. data/lib/jekyll/page.rb +17 -17
  41. data/lib/jekyll/post.rb +33 -33
  42. data/lib/jekyll/related_posts.rb +5 -5
  43. data/lib/jekyll/site.rb +84 -85
  44. data/lib/jekyll/static_file.rb +13 -0
  45. data/lib/jekyll/stevenson.rb +1 -1
  46. data/lib/jekyll/tags/highlight.rb +16 -6
  47. data/lib/jekyll/tags/include.rb +17 -17
  48. data/lib/jekyll/url.rb +2 -0
  49. data/lib/jekyll/utils.rb +79 -0
  50. data/lib/jekyll/version.rb +3 -0
  51. data/lib/site_template/_config.yml +3 -1
  52. data/lib/site_template/_includes/footer.html +61 -0
  53. data/lib/site_template/_includes/head.html +12 -0
  54. data/lib/site_template/_includes/header.html +27 -0
  55. data/lib/site_template/_layouts/default.html +9 -34
  56. data/lib/site_template/_layouts/page.html +14 -0
  57. data/lib/site_template/_layouts/post.html +11 -5
  58. data/lib/site_template/_posts/0000-00-00-this-post-demonstrates-post-content-styles.md +88 -0
  59. data/lib/site_template/about/index.md +10 -0
  60. data/lib/site_template/css/main.css +333 -100
  61. data/lib/site_template/feed.xml +21 -0
  62. data/lib/site_template/index.html +8 -4
  63. data/lib/site_template/projects/index.md +14 -0
  64. data/script/cibuild +0 -1
  65. data/script/rebund +1 -1
  66. data/site/_includes/analytics.html +2 -2
  67. data/site/_includes/css/normalize.css +1 -1
  68. data/site/_includes/css/style.css +28 -4
  69. data/site/_includes/docs_option.html +1 -1
  70. data/site/_includes/docs_ul.html +3 -3
  71. data/site/_includes/footer.html +1 -1
  72. data/site/_includes/header.html +2 -2
  73. data/site/_includes/news_item.html +1 -1
  74. data/site/_includes/primary-nav-items.html +4 -4
  75. data/site/_includes/section_nav.html +2 -2
  76. data/site/_includes/top.html +6 -7
  77. data/site/_layouts/news_item.html +1 -1
  78. data/site/_posts/2013-07-25-jekyll-1-0-4-released.markdown +1 -1
  79. data/site/_posts/2013-07-25-jekyll-1-1-2-released.markdown +1 -1
  80. data/site/_posts/2013-09-14-jekyll-1-2-1-released.markdown +1 -1
  81. data/site/_posts/2014-03-24-jekyll-1-5-0-released.markdown +19 -0
  82. data/site/docs/assets.md +14 -0
  83. data/site/docs/configuration.md +65 -56
  84. data/site/docs/contributing.md +7 -2
  85. data/site/docs/deployment-methods.md +1 -1
  86. data/site/docs/github-pages.md +1 -1
  87. data/site/docs/history.md +21 -0
  88. data/site/docs/index.md +7 -1
  89. data/site/docs/installation.md +28 -0
  90. data/site/docs/migrations.md +1 -1
  91. data/site/docs/plugins.md +6 -0
  92. data/site/docs/structure.md +3 -3
  93. data/site/docs/templates.md +44 -44
  94. data/site/docs/usage.md +1 -1
  95. data/site/docs/variables.md +15 -2
  96. data/site/favicon.png +0 -0
  97. data/site/feed.xml +0 -1
  98. data/site/img/article-footer.png +0 -0
  99. data/site/img/footer-arrow.png +0 -0
  100. data/site/img/footer-logo.png +0 -0
  101. data/site/img/logo-2x.png +0 -0
  102. data/site/img/octojekyll.png +0 -0
  103. data/site/img/tube.png +0 -0
  104. data/site/img/tube1x.png +0 -0
  105. data/site/index.html +5 -5
  106. data/site/js/modernizr-2.7.1.min.js +4 -0
  107. data/test/helper.rb +11 -0
  108. data/test/source/_drafts/draft-properties.text +11 -0
  109. data/test/source/_posts/2011-04-12-md-extension.md +1 -1
  110. data/test/source/_posts/2014-01-06-permalink-traversal.md +5 -0
  111. data/test/source/exploit.md +5 -0
  112. data/test/source/static_files.html +4 -0
  113. data/test/test_configuration.rb +2 -2
  114. data/test/test_draft.rb +56 -0
  115. data/test/test_excerpt.rb +2 -2
  116. data/test/test_filters.rb +1 -1
  117. data/test/test_generated_site.rb +10 -1
  118. data/test/test_kramdown.rb +1 -1
  119. data/test/test_layout_reader.rb +17 -0
  120. data/test/test_page.rb +10 -0
  121. data/test/test_pager.rb +4 -2
  122. data/test/test_path_sanitization.rb +14 -0
  123. data/test/test_post.rb +12 -1
  124. data/test/test_sass.rb +1 -64
  125. data/test/test_site.rb +26 -1
  126. data/test/test_tags.rb +39 -2
  127. data/test/{test_core_ext.rb → test_utils.rb} +12 -12
  128. metadata +200 -86
  129. data/lib/jekyll/converters/sass.rb +0 -58
  130. data/lib/jekyll/core_ext.rb +0 -55
  131. data/lib/site_template/css/syntax.css +0 -60
  132. data/site/js/modernizr-2.5.3.min.js +0 -4
@@ -14,9 +14,9 @@ module Jekyll
14
14
  end
15
15
 
16
16
  def build
17
- return [] unless self.site.posts.size > 1
17
+ return [] unless site.posts.size > 1
18
18
 
19
- if self.site.lsi
19
+ if site.lsi
20
20
  build_index
21
21
  lsi_related_posts
22
22
  else
@@ -30,7 +30,7 @@ module Jekyll
30
30
  lsi = Classifier::LSI.new(:auto_rebuild => false)
31
31
  display("Populating LSI...")
32
32
 
33
- self.site.posts.each do |x|
33
+ site.posts.each do |x|
34
34
  lsi.add_item(x)
35
35
  end
36
36
 
@@ -42,11 +42,11 @@ module Jekyll
42
42
  end
43
43
 
44
44
  def lsi_related_posts
45
- self.class.lsi.find_related(post.content, 11) - [self.post]
45
+ self.class.lsi.find_related(post.content, 11) - [post]
46
46
  end
47
47
 
48
48
  def most_recent_posts
49
- recent_posts = self.site.posts.reverse - [self.post]
49
+ recent_posts = site.posts.reverse - [post]
50
50
  recent_posts.first(10)
51
51
  end
52
52
 
@@ -11,54 +11,50 @@ module Jekyll
11
11
  #
12
12
  # config - A Hash containing site configuration details.
13
13
  def initialize(config)
14
- self.config = config.clone
14
+ self.config = config.clone
15
15
 
16
16
  %w[safe lsi highlighter baseurl exclude include future show_drafts limit_posts keep_files gems].each do |opt|
17
17
  self.send("#{opt}=", config[opt])
18
18
  end
19
19
 
20
- self.source = File.expand_path(config['source'])
21
- self.dest = File.expand_path(config['destination'])
22
- self.plugins = plugins_path
20
+ self.source = File.expand_path(config['source'])
21
+ self.dest = File.expand_path(config['destination'])
22
+ self.plugins = plugins_path
23
23
  self.permalink_style = config['permalink'].to_sym
24
24
 
25
25
  self.file_read_opts = {}
26
26
  self.file_read_opts[:encoding] = config['encoding'] if config['encoding']
27
27
 
28
- self.reset
29
- self.setup
28
+ reset
29
+ setup
30
30
  end
31
31
 
32
32
  # Public: Read, process, and write this Site to output.
33
33
  #
34
34
  # Returns nothing.
35
35
  def process
36
- self.reset
37
- self.read
38
- self.generate
39
- self.render
40
- self.cleanup
41
- self.write
36
+ reset
37
+ read
38
+ generate
39
+ render
40
+ cleanup
41
+ write
42
42
  end
43
43
 
44
44
  # Reset Site details.
45
45
  #
46
46
  # Returns nothing
47
47
  def reset
48
- self.time = if self.config['time']
49
- Time.parse(self.config['time'].to_s)
50
- else
51
- Time.now
52
- end
53
- self.layouts = {}
54
- self.posts = []
55
- self.pages = []
56
- self.static_files = []
57
- self.categories = Hash.new { |hash, key| hash[key] = [] }
58
- self.tags = Hash.new { |hash, key| hash[key] = [] }
59
- self.data = {}
60
-
61
- if self.limit_posts < 0
48
+ self.time = (config['time'] ? Time.parse(config['time'].to_s) : Time.now)
49
+ self.layouts = {}
50
+ self.posts = []
51
+ self.pages = []
52
+ self.static_files = []
53
+ self.categories = Hash.new { |hash, key| hash[key] = [] }
54
+ self.tags = Hash.new { |hash, key| hash[key] = [] }
55
+ self.data = {}
56
+
57
+ if limit_posts < 0
62
58
  raise ArgumentError, "limit_posts must be a non-negative number"
63
59
  end
64
60
  end
@@ -71,11 +67,11 @@ module Jekyll
71
67
 
72
68
  # If safe mode is off, load in any Ruby files under the plugins
73
69
  # directory.
74
- unless self.safe
75
- self.plugins.each do |plugins|
76
- Dir[File.join(plugins, "**/*.rb")].sort.each do |f|
77
- require f
78
- end
70
+ unless safe
71
+ plugins.each do |plugins|
72
+ Dir[File.join(plugins, "**/*.rb")].sort.each do |f|
73
+ require f
74
+ end
79
75
  end
80
76
  end
81
77
 
@@ -88,16 +84,16 @@ module Jekyll
88
84
  # Check that the destination dir isn't the source dir or a directory
89
85
  # parent to the source dir.
90
86
  def ensure_not_in_dest
91
- dest = Pathname.new(self.dest)
92
- Pathname.new(self.source).ascend do |path|
93
- if path == dest
87
+ dest_pathname = Pathname.new(dest)
88
+ Pathname.new(source).ascend do |path|
89
+ if path == dest_pathname
94
90
  raise FatalException.new "Destination directory cannot be or contain the Source directory."
95
91
  end
96
92
  end
97
93
  end
98
94
 
99
95
  def require_gems
100
- self.gems.each do |gem|
96
+ gems.each do |gem|
101
97
  if plugin_allowed?(gem)
102
98
  require gem
103
99
  end
@@ -105,11 +101,11 @@ module Jekyll
105
101
  end
106
102
 
107
103
  def plugin_allowed?(gem_name)
108
- whitelist.include?(gem_name) || !self.safe
104
+ whitelist.include?(gem_name) || !safe
109
105
  end
110
106
 
111
107
  def whitelist
112
- @whitelist ||= Array[self.config['whitelist']].flatten || []
108
+ @whitelist ||= Array[config['whitelist']].flatten
113
109
  end
114
110
 
115
111
  # Internal: Setup the plugin search path
@@ -117,7 +113,7 @@ module Jekyll
117
113
  # Returns an Array of plugin search paths
118
114
  def plugins_path
119
115
  if (config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
120
- [File.join(self.source, config['plugins'])]
116
+ [File.join(source, config['plugins'])]
121
117
  else
122
118
  Array(config['plugins']).map { |d| File.expand_path(d) }
123
119
  end
@@ -128,8 +124,8 @@ module Jekyll
128
124
  # Returns nothing.
129
125
  def read
130
126
  self.layouts = LayoutReader.new(self).read
131
- self.read_directories
132
- self.read_data(config['data_source'])
127
+ read_directories
128
+ read_data(config['data_source'])
133
129
  end
134
130
 
135
131
  # Recursively traverse directories to find posts, pages and static files
@@ -140,24 +136,24 @@ module Jekyll
140
136
  #
141
137
  # Returns nothing.
142
138
  def read_directories(dir = '')
143
- base = File.join(self.source, dir)
139
+ base = File.join(source, dir)
144
140
  entries = Dir.chdir(base) { filter_entries(Dir.entries('.'), base) }
145
141
 
146
- self.read_posts(dir)
147
- self.read_drafts(dir) if self.show_drafts
148
- self.posts.sort!
142
+ read_posts(dir)
143
+ read_drafts(dir) if show_drafts
144
+ posts.sort!
149
145
  limit_posts! if limit_posts > 0 # limit the posts if :limit_posts option is set
150
146
 
151
147
  entries.each do |f|
152
148
  f_abs = File.join(base, f)
153
149
  if File.directory?(f_abs)
154
150
  f_rel = File.join(dir, f)
155
- read_directories(f_rel) unless self.dest.sub(/\/$/, '') == f_abs
151
+ read_directories(f_rel) unless dest.sub(/\/$/, '') == f_abs
156
152
  elsif has_yaml_header?(f_abs)
157
- page = Page.new(self, self.source, dir, f)
153
+ page = Page.new(self, source, dir, f)
158
154
  pages << page if page.published?
159
155
  else
160
- static_files << StaticFile.new(self, self.source, dir, f)
156
+ static_files << StaticFile.new(self, source, dir, f)
161
157
  end
162
158
  end
163
159
 
@@ -174,7 +170,7 @@ module Jekyll
174
170
  posts = read_content(dir, '_posts', Post)
175
171
 
176
172
  posts.each do |post|
177
- if post.published? && (self.future || post.date <= self.time)
173
+ if post.published? && (future || post.date <= time)
178
174
  aggregate_post_info(post)
179
175
  end
180
176
  end
@@ -190,13 +186,15 @@ module Jekyll
190
186
  drafts = read_content(dir, '_drafts', Draft)
191
187
 
192
188
  drafts.each do |draft|
193
- aggregate_post_info(draft)
189
+ if draft.published?
190
+ aggregate_post_info(draft)
191
+ end
194
192
  end
195
193
  end
196
194
 
197
195
  def read_content(dir, magic_dir, klass)
198
196
  get_entries(dir, magic_dir).map do |entry|
199
- klass.new(self, self.source, dir, entry) if klass.valid?(entry)
197
+ klass.new(self, source, dir, entry) if klass.valid?(entry)
200
198
  end.reject do |entry|
201
199
  entry.nil?
202
200
  end
@@ -206,15 +204,15 @@ module Jekyll
206
204
  #
207
205
  # Returns nothing
208
206
  def read_data(dir)
209
- base = File.join(self.source, dir)
210
- return unless File.directory?(base) && (!self.safe || !File.symlink?(base))
207
+ base = File.join(source, dir)
208
+ return unless File.directory?(base) && (!safe || !File.symlink?(base))
211
209
 
212
210
  entries = Dir.chdir(base) { Dir['*.{yaml,yml}'] }
213
211
  entries.delete_if { |e| File.directory?(File.join(base, e)) }
214
212
 
215
213
  entries.each do |entry|
216
- path = File.join(self.source, dir, entry)
217
- next if File.symlink?(path) && self.safe
214
+ path = File.join(source, dir, entry)
215
+ next if File.symlink?(path) && safe
218
216
 
219
217
  key = sanitize_filename(File.basename(entry, '.*'))
220
218
  self.data[key] = SafeYAML.load_file(path)
@@ -225,7 +223,7 @@ module Jekyll
225
223
  #
226
224
  # Returns nothing.
227
225
  def generate
228
- self.generators.each do |generator|
226
+ generators.each do |generator|
229
227
  generator.generate(self)
230
228
  end
231
229
  end
@@ -237,12 +235,12 @@ module Jekyll
237
235
  relative_permalinks_deprecation_method
238
236
 
239
237
  payload = site_payload
240
- [self.posts, self.pages].flatten.each do |page_or_post|
241
- page_or_post.render(self.layouts, payload)
238
+ [posts, pages].flatten.each do |page_or_post|
239
+ page_or_post.render(layouts, payload)
242
240
  end
243
241
 
244
- self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
245
- self.tags.values.map { |ps| ps.sort! { |a, b| b <=> a } }
242
+ categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
243
+ tags.values.map { |ps| ps.sort! { |a, b| b <=> a } }
246
244
  rescue Errno::ENOENT => e
247
245
  # ignore missing layout dir
248
246
  end
@@ -258,7 +256,7 @@ module Jekyll
258
256
  #
259
257
  # Returns nothing.
260
258
  def write
261
- each_site_file { |item| item.write(self.dest) }
259
+ each_site_file { |item| item.write(dest) }
262
260
  end
263
261
 
264
262
  # Construct a Hash of Posts indexed by the specified Post attribute.
@@ -277,8 +275,8 @@ module Jekyll
277
275
  def post_attr_hash(post_attr)
278
276
  # Build a hash map based on the specified post attribute ( post attr =>
279
277
  # array of posts ) then sort each array in reverse order.
280
- hash = Hash.new { |hsh, key| hsh[key] = Array.new }
281
- self.posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } }
278
+ hash = Hash.new { |hash, key| hash[key] = [] }
279
+ posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } }
282
280
  hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a } }
283
281
  hash
284
282
  end
@@ -288,7 +286,7 @@ module Jekyll
288
286
  #
289
287
  # Returns the Hash to be hooked to site.data.
290
288
  def site_data
291
- self.config['data'] || self.data
289
+ config['data'] || data
292
290
  end
293
291
 
294
292
  # The Hash payload containing site-wide data.
@@ -306,14 +304,15 @@ module Jekyll
306
304
  # See Site#post_attr_hash for type info.
307
305
  def site_payload
308
306
  {"jekyll" => { "version" => Jekyll::VERSION },
309
- "site" => self.config.merge({
310
- "time" => self.time,
311
- "posts" => self.posts.sort { |a, b| b <=> a },
312
- "pages" => self.pages,
313
- "html_pages" => self.pages.reject { |page| !page.html? },
314
- "categories" => post_attr_hash('categories'),
315
- "tags" => post_attr_hash('tags'),
316
- "data" => site_data})}
307
+ "site" => config.merge({
308
+ "time" => time,
309
+ "posts" => posts.sort { |a, b| b <=> a },
310
+ "pages" => pages,
311
+ "static_files" => static_files.sort { |a, b| a.relative_path <=> b.relative_path },
312
+ "html_pages" => pages.reject { |page| !page.html? },
313
+ "categories" => post_attr_hash('categories'),
314
+ "tags" => post_attr_hash('tags'),
315
+ "data" => site_data})}
317
316
  end
318
317
 
319
318
  # Filter out any files/directories that are hidden or backup files (start
@@ -334,7 +333,7 @@ module Jekyll
334
333
  #
335
334
  # Returns the Converter instance implementing the given Converter.
336
335
  def getConverterImpl(klass)
337
- matches = self.converters.select { |c| c.class == klass }
336
+ matches = converters.select { |c| c.class == klass }
338
337
  if impl = matches.first
339
338
  impl
340
339
  else
@@ -351,9 +350,9 @@ module Jekyll
351
350
  # Returns array of instances of subclasses of parameter
352
351
  def instantiate_subclasses(klass)
353
352
  klass.subclasses.select do |c|
354
- !self.safe || c.safe
353
+ !safe || c.safe
355
354
  end.sort.map do |c|
356
- c.new(self.config)
355
+ c.new(config)
357
356
  end
358
357
  end
359
358
 
@@ -364,7 +363,7 @@ module Jekyll
364
363
  #
365
364
  # Returns the list of entries to process
366
365
  def get_entries(dir, subfolder)
367
- base = File.join(self.source, dir, subfolder)
366
+ base = File.join(source, dir, subfolder)
368
367
  return [] unless File.exists?(base)
369
368
  entries = Dir.chdir(base) { filter_entries(Dir['**/*'], base) }
370
369
  entries.delete_if { |e| File.directory?(File.join(base, e)) }
@@ -376,9 +375,9 @@ module Jekyll
376
375
  #
377
376
  # Returns nothing
378
377
  def aggregate_post_info(post)
379
- self.posts << post
380
- post.categories.each { |c| self.categories[c] << post }
381
- post.tags.each { |c| self.tags[c] << post }
378
+ posts << post
379
+ post.categories.each { |c| categories[c] << post }
380
+ post.tags.each { |c| tags[c] << post }
382
381
  end
383
382
 
384
383
  def relative_permalinks_deprecation_method
@@ -395,7 +394,7 @@ module Jekyll
395
394
 
396
395
  def each_site_file
397
396
  %w(posts pages static_files).each do |type|
398
- self.send(type).each do |item|
397
+ send(type).each do |item|
399
398
  yield item
400
399
  end
401
400
  end
@@ -404,7 +403,7 @@ module Jekyll
404
403
  private
405
404
 
406
405
  def has_relative_page?
407
- self.pages.any? { |page| page.uses_relative_permalinks }
406
+ pages.any? { |page| page.uses_relative_permalinks }
408
407
  end
409
408
 
410
409
  def has_yaml_header?(file)
@@ -412,8 +411,8 @@ module Jekyll
412
411
  end
413
412
 
414
413
  def limit_posts!
415
- limit = self.posts.length < limit_posts ? self.posts.length : limit_posts
416
- self.posts = self.posts[-limit, limit]
414
+ limit = posts.length < limit_posts ? posts.length : limit_posts
415
+ self.posts = posts[-limit, limit]
417
416
  end
418
417
 
419
418
  def site_cleaner
@@ -421,9 +420,9 @@ module Jekyll
421
420
  end
422
421
 
423
422
  def sanitize_filename(name)
424
- name = name.gsub(/[^\w\s_-]+/, '')
425
- name = name.gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
426
- name = name.gsub(/\s+/, '_')
423
+ name.gsub!(/[^\w\s_-]+/, '')
424
+ name.gsub!(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
425
+ name.gsub(/\s+/, '_')
427
426
  end
428
427
  end
429
428
  end
@@ -21,6 +21,11 @@ module Jekyll
21
21
  File.join(@base, @dir, @name)
22
22
  end
23
23
 
24
+ # Returns the source file path relative to the site source
25
+ def relative_path
26
+ @relative_path ||= path.sub(/\A#{@site.source}/, '')
27
+ end
28
+
24
29
  # Obtain destination path.
25
30
  #
26
31
  # dest - The String path to the destination dir.
@@ -66,5 +71,13 @@ module Jekyll
66
71
  @@mtimes = Hash.new
67
72
  nil
68
73
  end
74
+
75
+ def to_liquid
76
+ {
77
+ "path" => relative_path,
78
+ "modified_time" => mtime.to_s,
79
+ "extname" => File.extname(relative_path)
80
+ }
81
+ end
69
82
  end
70
83
  end
@@ -15,7 +15,7 @@ module Jekyll
15
15
  def initialize(level = INFO)
16
16
  @log_level = level
17
17
  end
18
-
18
+
19
19
  # Public: Print a jekyll debug message to stdout
20
20
  #
21
21
  # topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.