Add jekyll doctor command
This commit is contained in:
parent
e22b1bb74a
commit
b355ef6469
14
bin/jekyll
14
bin/jekyll
|
@ -86,6 +86,20 @@ command :serve do |c|
|
|||
end
|
||||
alias_command :server, :serve
|
||||
|
||||
command :doctor do |c|
|
||||
c.syntax = 'jekyll doctor'
|
||||
c.description = 'Search site and print specific deprecation warnings'
|
||||
|
||||
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||
|
||||
c.action do |args, options|
|
||||
options = normalize_options(options.__hash__)
|
||||
options = Jekyll.configuration(options)
|
||||
Jekyll::Commands::Doctor.process(options)
|
||||
end
|
||||
end
|
||||
alias_command :hyde, :doctor
|
||||
|
||||
command :import do |c|
|
||||
c.syntax = 'jekyll import <platform> [options]'
|
||||
c.description = 'Import your old blog to Jekyll'
|
||||
|
|
|
@ -114,7 +114,14 @@ module Jekyll
|
|||
self.data.deep_merge({
|
||||
"url" => self.url,
|
||||
"content" => self.content,
|
||||
"path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') })
|
||||
"path" => self.data['path'] || path })
|
||||
end
|
||||
|
||||
# The path to the source file
|
||||
#
|
||||
# Returns the path to the source file
|
||||
def path
|
||||
File.join(@dir, @name).sub(/\A\//, '')
|
||||
end
|
||||
|
||||
# Obtain destination path.
|
||||
|
|
|
@ -422,6 +422,7 @@ module Jekyll
|
|||
|
||||
def relative_permalinks_deprecation_method
|
||||
if config['relative_permalinks'] && !@deprecated_relative_permalinks
|
||||
puts # Places newline after "Generating..."
|
||||
Jekyll::Logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" +
|
||||
" in subfolders must be absolute" +
|
||||
" permalinks relative to the site" +
|
||||
|
|
Loading…
Reference in New Issue