Open yourpalal opened 10 years ago
@yourpalal thanks for the heads up. I didn't think about that case.
Unless I'm missing something it doesn't really make sense to return an array from the root index because there can only be 1 index (i.e. example.com
). I need to document this.
If you want to dynamically create example.com/foo
and example.com/bar
you can create a nested page and return an array there. I added a test with an example here.
Does that make sense?
Ah okay, that makes sense. I had imagined that arrays would create children, not siblings.
I.e. example.com/baz/foo, example.com/baz/bar.
That makes sense. I guess the only thing I would want then is maybe an error message when you return an array from the index, and something in the documentation.
I was thinking I might try contributing to the project at some point, is there any documentation on how to get started with that? eg. how to run the tests, any code conventions/etc
Yeah I can see how that could be confusing. I'll add a warning soon.
Ideas/contributions wold be great! I updated the readme with some basic info https://github.com/moudy/broccoli-taco#contributing
Not sure if this is related, but the example here: http://broccoli-taco.com/documentation/#dynamic-pages Does not work.
I lied, it works and I was being silly.
If you export an array of data from site/pages/data.js, the resulting pages are create in the wrong tmp directory, and then are not ever merged into the site.
A simple bugfix that works in my case is changing lib/broccoli-taco-handlebars.js:57 from
dirname.substring(0, dirname.lastIndexOf('/'))
todirname
That said, I presume the substring stuff is in there for a reason, so something a bit more complicated might be needed.
Otherwise BT is pretty cool :)