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

Generating overview pages #648

Closed
agross opened this issue Feb 23, 2015 · 11 comments
Closed

Generating overview pages #648

agross opened this issue Feb 23, 2015 · 11 comments

Comments

@agross
Copy link

agross commented Feb 23, 2015

It's me again ;-)

I'm slowly moving forward, which is a good thing. Assemble if very fast for us: 20K HTML pages in 6 minutes. That is what we hoped for!

I now have a question how I would go about generating overview pages. Let's say I have templates in the following form:

/generated/products/2765/10.json (title: Foo)
/generated/products/2765/11.json (title: Bar)
/generated/products/2765/12.json (title: Baz)

What would I have to do to create page and have a list with Foo, Bar and Baz rendered? Is there a way to traverse parent/child relationships OOTB or would I have to extend my data model?

@jonschlinkert
Copy link
Member

I'm slowing moving forward, which is a good thing. Assemble if very fast for us: 20K HTML pages in 6 minutes.

that's great! considering it hasn't shipped yet and we have a few bugs to work out, I think you're doing amazingly well, and it's helping us get to the finish line! so thanks.

create page and have a list with Foo, Bar and Baz rendered

@doowb what do you think? we've talked about this a lot. I'm thinking we probably need to do a plugin and maybe add a convenience method or two for working with collections.

@agross what is your wishlist? :)

@doowb
Copy link
Member

doowb commented Feb 23, 2015

This can all be done with helpers, middleware, and plugins. We just don't have anything written specifically to achieve this yet. We'd like to come up with the pieces to make it easier, but I think we need to come up with the utilities to help build out the other pieces first.

Some of the utilities that I think we can use are:

Collections

  • middleware to generate collections from page front-matter (similar to assemble 0.4.x)
  • helpers to use collection data in pages

Pagination

  • this goes along with collections but should act independently
  • plugin to generate new pages to add to the stream based on pagination options
  • helpers to use pagination in pages

Relative Linking

  • helpers to generate relative links between normal pages, collections pages (lists), and pagination pages (navigation).

We have some methods built in already that might help with some of these or that utility methods should take advantage of to make it easier, but it's not all gathered together yet.

Please add additional thoughts because I probably missed something.

@jonschlinkert
Copy link
Member

great summary @doowb.

@jonschlinkert
Copy link
Member

@agross were you able to get this particular challenge resolved? We started working on some collections stuff a couple of days ago that might be relevant

@agross
Copy link
Author

agross commented Mar 9, 2015

@jonschlinkert No, the project is currently on hold but will be resurrected at the end of April. It would be great if you had something to play with until then. ;-)

@jonschlinkert
Copy link
Member

It would be great if you had something to play with until then. ;-)

bah! I wish I had seen this before. Sorry I didn't see your reply! If you're still interested in playing around with something I'll try to prioritize getting something pushed up

@stefanwalther
Copy link
Contributor

If you have something to play with and give early feedback I am also happy to do so ...

@jonschlinkert
Copy link
Member

👍 that's great, I'll try to come up with something

@agross
Copy link
Author

agross commented Mar 23, 2015

👍

@dustintheweb
Copy link

yuss plz. I am jonesing for this exact same thing. Using the permalink plugin, I am able to get my desired nested file structure, but it does not create the wanted trail of index files along the way. As an experiment I tried to create a 2nd loop that injected the index files where I wanted them, but as you know, they were outside the scope/context of the original loop so the relationship was broken.

Update: posted a solution here: assemble/grunt-assemble-permalinks#52

@jonschlinkert
Copy link
Member

closing since this refers to more implementation related

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

No branches or pull requests

5 participants