diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb index 0fab8b3a..e0ae36a1 100644 --- a/lib/jekyll/commands/doctor.rb +++ b/lib/jekyll/commands/doctor.rb @@ -39,7 +39,7 @@ module Jekyll contains_deprecated_pages = false site.pages.each do |page| if page.uses_relative_permalinks - Jekyll.logger.warn "Deprecation:", "'#{page.path}' uses relative" + + Jekyll::Deprecator.deprecation_message "'#{page.path}' uses relative" + " permalinks which will be deprecated in" + " Jekyll v2.0.0 and beyond." contains_deprecated_pages = true diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index f7f39cb5..e4855a9d 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -206,7 +206,7 @@ module Jekyll config = clone # Provide backwards-compatibility if config.key?('auto') || config.key?('watch') - Jekyll.logger.warn "Deprecation:", "Auto-regeneration can no longer" + + Jekyll::Deprecator.deprecation_message "Auto-regeneration can no longer" + " be set from your configuration file(s). Use the"+ " --[no-]watch/-w command-line option instead." config.delete('auto') @@ -214,14 +214,14 @@ module Jekyll end if config.key? 'server' - Jekyll.logger.warn "Deprecation:", "The 'server' configuration option" + + Jekyll::Deprecator.deprecation_message "The 'server' configuration option" + " is no longer accepted. Use the 'jekyll serve'" + " subcommand to serve your site with WEBrick." config.delete('server') end if config.key? 'server_port' - Jekyll.logger.warn "Deprecation:", "The 'server_port' configuration option" + + Jekyll::Deprecator.deprecation_message "The 'server_port' configuration option" + " has been renamed to 'port'. Please update your config" + " file accordingly." # copy but don't overwrite: @@ -230,7 +230,7 @@ module Jekyll end if config.key? 'pygments' - Jekyll.logger.warn "Deprecation:", "The 'pygments' configuration option" + + Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" + " has been renamed to 'highlighter'. Please update your" + " config file accordingly. The allowed values are 'rouge', " + "'pygments' or null." @@ -241,7 +241,7 @@ module Jekyll %w[include exclude].each do |option| if config.fetch(option, []).is_a?(String) - Jekyll.logger.warn "Deprecation:", "The '#{option}' configuration option" + + Jekyll::Deprecator.deprecation_message "The '#{option}' configuration option" + " must now be specified as an array, but you specified" + " a string. For now, we've treated the string you provided" + " as a list of comma-separated values." diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 0e1063c1..aadfb8d0 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -471,7 +471,7 @@ module Jekyll def relative_permalinks_deprecation_method if config['relative_permalinks'] && has_relative_page? - Jekyll.logger.warn "Deprecation:", "Since v2.0, permalinks for pages" + + Jekyll::Deprecator.deprecation_message "Since v2.0, permalinks for pages" + " in subfolders must be relative to the" + " site source directory, not the parent" + " directory. Check http://jekyllrb.com/docs/upgrading/"+