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

dynamic pages from root index are not merged properly #3

Open
yourpalal opened this issue Aug 17, 2014 · 4 comments
Open

dynamic pages from root index are not merged properly #3

yourpalal opened this issue Aug 17, 2014 · 4 comments

Comments

@yourpalal
Copy link

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('/'))
to dirname

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 :)

@moudy
Copy link
Owner

moudy commented Aug 18, 2014

@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?

@yourpalal
Copy link
Author

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

@moudy
Copy link
Owner

moudy commented Aug 18, 2014

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

@givanse
Copy link
Contributor

givanse commented Mar 20, 2015

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.

givanse pushed a commit to givanse/broccoli-taco that referenced this issue Aug 7, 2018
Add destfile option to enable plugin to be used with non-html files
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

3 participants