lib/cloudcannon-jekyll/generators/collections.rb in cloudcannon-jekyll-4.0.5 vs lib/cloudcannon-jekyll/generators/collections.rb in cloudcannon-jekyll-4.0.6

- old
+ new

@@ -104,9 +104,13 @@ } collections_config[key] = defaults.merge(collections_config[key] || {}) end + # Remove auto-discovered collections with duplicate paths + set_paths = collections_config.filter_map { |_, v| v['path'] unless v['auto_discovered'] } + collections_config.delete_if { |_, v| v['auto_discovered'] && set_paths.include?(v['path']) } + collections_config end def drafts_paths paths = @split_posts.keys.map do |key|