Configuration#add_default_collections: fix bug where DEFAULTS['collections'] is modified
This commit is contained in:
parent
d01f7943de
commit
f52a0e7200
|
@ -297,11 +297,13 @@ module Jekyll
|
||||||
config['collections'] = Hash[config['collections'].map { |c| [c, {}] }]
|
config['collections'] = Hash[config['collections'].map { |c| [c, {}] }]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add posts.
|
config['collections'] = Utils.deep_merge_hashes(
|
||||||
config['collections']['posts'] ||= {}
|
{ 'posts' => {} }, config['collections']
|
||||||
config['collections']['posts']['output'] = true
|
).tap do |collections|
|
||||||
if config['permalink']
|
collections['posts']['output'] = true
|
||||||
config['collections']['posts']['permalink'] ||= style_to_permalink(config['permalink'])
|
if config['permalink']
|
||||||
|
collections['posts']['permalink'] ||= style_to_permalink(config['permalink'])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
config
|
config
|
||||||
|
|
Loading…
Reference in New Issue