Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop through collections #28

Open
gbreux opened this issue May 4, 2017 · 0 comments
Open

Loop through collections #28

gbreux opened this issue May 4, 2017 · 0 comments

Comments

@gbreux
Copy link

gbreux commented May 4, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants