-
Notifications
You must be signed in to change notification settings - Fork 181
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
Generate a collection using another collection #466
Comments
There isn't a built-in way to do this (at the moment), for exactly the reasons you described: collections are only processed once, so your There are some ideas for dynamically generating collections discussed here that we're exploring, but haven't yet nailed down an elegant implementation. In the meantime, though, as mentioned in an issue from the blog template repo, I think @camuthig has a solution that might do what you're hoping: he wrote an |
Thank you for your suggestions |
Unfortunately the aforementioned solution no longer works because |
@paulofreitas you are correct about the protected status of the I dug into it a bit, and it looks like we should be able to access the same loader directly via the container, which is still publicly available on the Jigsaw instance: I created a branch, and it seems to work on my machine. Would you be willing to try using this branch instead of |
@camuthig please, let me know how to make pagination by your extension? |
@palexandrite I haven't worked with this project much in recent years. If you add pagination to the general category layout, does it not add it to the generated ones as well? I'm not immediately sure how to add pagination to the user-defined category layout, so hard for me to quickly say how to add it to the generated ones. |
@camuthig thank you pretty much for your answer. About the pagination in Jigsaw, I should make the pagination by YAML syntax in a head of a file (such as an extended layout or a page of a main category according to the Jigsaw documentation. But the pagination shown only for simple pages not for pages of collections. It would be nice to have a pagination in a page of a collection :-) |
I'm playing with the blog template, and I would like to generate the
categories
collection using theposts
collections.Currently, the template contains 1 file in
source/_categories
for each category known, but as it's possible to loop in theposts
collection and look for the categories, it seems not to be possible to use a collection to generate another one (due to the fact that, collections aren't built (yet) duringbeforeBuild
, and it's too late arriving atafterCollections
to append a new one in config).Is there a way or workaround to use a built collection (
posts
) to populate another (categories
) ?The text was updated successfully, but these errors were encountered: