I’m using a plugin named jekyll postfiles to handle assets beside my docs. The problem is that this plugin currently only supports posts. And I want to also use the same approach for my collections. With a little research I found that posts are also a kind of collection. And all posts and collection docs can be accessed by
`site.collections`
which is organized in the following manner:
{
"posts" => # < Jekyll::Collection @label = posts docs = [All Posts are here] > , "myfirstcollection" => # < Jekyll::Collection @label = myfirstcollection docs = [All myfirstcollection docs are here] >
}
I realize that in this plugin, there is a loop to iterate all post docs :
site.posts.docs.each do |post|
copy_post_files(post)
end
Now I think with a little tweak here we can also handle collection docs. However I have no experience with ruby and I don’t know what to do.
any Idea?