Print deprecation warnings for 'server', 'watch' and 'auto' when loaded from files. Fixes #972
This commit is contained in:
parent
e531925cae
commit
55a964a7da
|
@ -145,10 +145,19 @@ module Jekyll
|
|||
def backwards_compatibilize
|
||||
config = clone
|
||||
# Provide backwards-compatibility
|
||||
if config.has_key? 'auto'
|
||||
Jekyll::Logger.warn "Deprecation:", "'auto' has been changed to " +
|
||||
"'watch'. Please update your configuration to use 'watch'."
|
||||
config['watch'] = config['auto']
|
||||
if config.has_key?('auto') || config.has_key?('watch')
|
||||
Jekyll::Logger.warn "Deprecation:", "Auto-regeneration can no longer" +
|
||||
" be set from your configuration file(s). Use the"+
|
||||
" --watch/-w command-line option instead."
|
||||
config.delete('auto')
|
||||
config.delete('watch')
|
||||
end
|
||||
|
||||
if config.has_key? 'server'
|
||||
Jekyll::Logger.warn "Deprecation:", "The 'server' configuration option" +
|
||||
" is no longer accepted. Use the 'jekyll serve'" +
|
||||
" subcommand to serve your site with WEBrick."
|
||||
config.delete('server')
|
||||
end
|
||||
|
||||
config
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
auto: false
|
||||
server: true
|
||||
permalink: /docs/:categories/:title
|
||||
pygments: true
|
||||
gauges_id: 503c5af6613f5d0f19000027
|
||||
|
|
Loading…
Reference in New Issue