lib/cheesy-gallery/generator.rb in cheesy-gallery-0.7.0 vs lib/cheesy-gallery/generator.rb in cheesy-gallery-0.8.0
- old
+ new
@@ -30,10 +30,10 @@
doc.data['layout'] = 'gallery'
collection.docs << doc if site.unpublished || doc.published?
end
# create replacements for the files with additional functionality
- image_files = collection.files.map do |f|
+ image_files = collection.files.sort { |a, b| a.name <=> b.name }.map do |f|
CheesyGallery::ImageFile.new(
site, collection, f,
max_size: collection.metadata['max_size'] || '1920x1080',
quality: collection.metadata['quality'] || 50
)