Add doctor command

This commit is contained in:
Parker Moore 2013-05-11 18:02:53 +02:00
parent 6294c4a204
commit 19bc54bb07
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
module Jekyll
module Commands
class Doctor < Command
class << self
def process(options)
site = Jekyll::Site.new(options)
site.read
deprecate_relative_permalinks(site)
end
def deprecate_relative_permalinks(site)
site.pages.each do |page|
if page.uses_relative_permalinks
Jekyll::Logger.warn "Deprecation:", "'#{page.path}' uses relative" +
" permalinks which will be automatically" +
" deprecated in Jekyll v1.1."
end
end
end
end
end
end
end