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
|
def backwards_compatibilize
|
||||||
config = clone
|
config = clone
|
||||||
# Provide backwards-compatibility
|
# Provide backwards-compatibility
|
||||||
if config.has_key? 'auto'
|
if config.has_key?('auto') || config.has_key?('watch')
|
||||||
Jekyll::Logger.warn "Deprecation:", "'auto' has been changed to " +
|
Jekyll::Logger.warn "Deprecation:", "Auto-regeneration can no longer" +
|
||||||
"'watch'. Please update your configuration to use 'watch'."
|
" be set from your configuration file(s). Use the"+
|
||||||
config['watch'] = config['auto']
|
" --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
|
end
|
||||||
|
|
||||||
config
|
config
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
auto: false
|
|
||||||
server: true
|
|
||||||
permalink: /docs/:categories/:title
|
permalink: /docs/:categories/:title
|
||||||
pygments: true
|
pygments: true
|
||||||
gauges_id: 503c5af6613f5d0f19000027
|
gauges_id: 503c5af6613f5d0f19000027
|
||||||
|
|
Loading…
Reference in New Issue