mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Add doctor command
This commit is contained in:
24
lib/jekyll/commands/doctor.rb
Normal file
24
lib/jekyll/commands/doctor.rb
Normal 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
|
||||
Reference in New Issue
Block a user