mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Configuration#add_default_collections: fix bug where DEFAULTS['collections'] is modified
This commit is contained in:
@@ -297,11 +297,13 @@ module Jekyll
|
||||
config['collections'] = Hash[config['collections'].map { |c| [c, {}] }]
|
||||
end
|
||||
|
||||
# Add posts.
|
||||
config['collections']['posts'] ||= {}
|
||||
config['collections']['posts']['output'] = true
|
||||
if config['permalink']
|
||||
config['collections']['posts']['permalink'] ||= style_to_permalink(config['permalink'])
|
||||
config['collections'] = Utils.deep_merge_hashes(
|
||||
{ 'posts' => {} }, config['collections']
|
||||
).tap do |collections|
|
||||
collections['posts']['output'] = true
|
||||
if config['permalink']
|
||||
collections['posts']['permalink'] ||= style_to_permalink(config['permalink'])
|
||||
end
|
||||
end
|
||||
|
||||
config
|
||||
|
||||
Reference in New Issue
Block a user