diff --git a/bin/jekyll b/bin/jekyll index 6d3767e6..2e631bbb 100755 --- a/bin/jekyll +++ b/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 [options]' c.description = 'Import your old blog to Jekyll' diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index e44cf329..872c6cce 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -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. diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 3264cfc5..69c4815f 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -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" +