These are chat archives for jescalan/roots

21st
Jun 2016
Dan Woodward
@deedubbleyoo
Jun 21 2016 09:27
@jescalan are you able to help with the contentful-roots extension? I want to add filters to the content_type, but the link seems to point to documentation that has changed. So I am not clear what format the filters / parameters should take.
David Eglin
@djeglin
Jun 21 2016 11:39
Hi all.
So, I'm sort of trying out a project structure similar to that set out in the MojoTech video, and I'm having trouble getting roots to not export a templates or shared folder when it renders. I've tried adding views/templates etc to the ignores array in app.coffee, but that doesn't seem to exclude the folders from exporting.
Any ideas?
David Eglin
@djeglin
Jun 21 2016 12:00
Nvm. Sorted it. Search is a wonderful thing, etc etc
Actually... No. Adding views/templates/** to ignores prevents client-templates from rendering out my templates.js as well, it seems...
David Eglin
@djeglin
Jun 21 2016 15:03
Okay, so I sorted that out, but I seem to be having another issue...
Basically, I'm struggling with dynamic-content at the moment. I create a folder under my site root and put some posts in there (which appear to render out properly). I even set it to output to a json file which appears to contain the right info. But when I try to invoke site.posts.all() for example, in my index template, I'm thrown a "can't get property 'all' of undefined" error.
Jeff Escalante
@jescalan
Jun 21 2016 15:34
@deedubbleyoo i don't maintain roots-contentful, but maybe someone else will come through who can help, or file an issue!
@djeglin is site populated at all?
David Eglin
@djeglin
Jun 21 2016 15:51
@jescalan I've managed to get a bit further... I've got site realising that there is a folder named "on" and adding that to site, but because I'm organising my posts in subfolders, the object is coming back as empty
(and site.on.all() is apparently not a function)
David Eglin
@djeglin
Jun 21 2016 16:02
I can go a level down to site.on.technology and that returns an item properly
Jeff Escalante
@jescalan
Jun 21 2016 16:03
you probably are running into this bug: carrot/roots-dynamic-content#7
David Eglin
@djeglin
Jun 21 2016 16:09
Awesome. I've managed to code around it now that I know what is happening. Thanks for pointing me in the right direction :)
Jeff Escalante
@jescalan
Jun 21 2016 16:36
haha for sure. sorry about that! maybe someday someone will fix this bug
honestly i think spike will hit a stable release before i get to it though