amp-jekyll
amp-jekyll copied to clipboard
Loop through collections
Hi there,
Would it be possible to also loop through all collections and pages instead of posts only?
I think it can be interesting :)
I tried to add
site.collections.each do |collection|
collection.docs.each do |post|
next if post.data['skip_amp'] == true
site.pages << AmpPost.new(site, site.source, File.join(dir, post.id), post)
end
end
But as my knowledge in ruby is super limited, it failed (collection.docs doesn't exist) so maybe you can see a better workaround?
Thanks