These are chat archives for jescalan/roots

29th
Jul 2014
Russell Osborne
@rposborne
Jul 29 2014 16:59
quick question, for v3. Do all 'posts' need to be jade to be able to import a “template”.
aka is front matter defined “template” for a markdown file no longer supported?
Russell Osborne
@rposborne
Jul 29 2014 17:06
@jenius quick question
Jeff Escalante
@jescalan
Jul 29 2014 19:06
hi @rposborne!
sorry im here
are you asking about v2 or v3?
just kidding im an idiot
so this is about the dynamic content extension then
if you're asking about the layout property in the front matter, this is not supported anymore
whatever the templating language you use is can support layouts
Russell Osborne
@rposborne
Jul 29 2014 20:07
sorta of a shame, increases the barrier of entry from other static blog platforms. and using nice markdown editors to work with content.
but thanks for the clairifcation.
Jeff Escalante
@jescalan
Jul 29 2014 21:11
yeah, it was too much technical debt to maintain, unfortunately
although it might make life a little harder in some situations, it was definitely the right decision
layout engines are up to the templating languages
people constantly wanted more out of the templating
like the ability to share variables between them in certain ways, etc
which is not possible without patching the templating language itself, which we'd have to do for every templating language since roots supports many
if you have any suggestions as to how to make things easier most welcome though! we're all about making things simple if we can
you're def right that it makes things a little more complex and doesn't allow straight markdown with layouts
Russell Osborne
@rposborne
Jul 29 2014 21:15
sure sure… but the front matter is just asking for said engine. Not trying to do it’s job
Jeff Escalante
@jescalan
Jul 29 2014 22:22
eh, it's not really, its actually a little more involved than that
if you specify a layout, the layout needs to know where to render the content
which means you need a custom directive, or a variable that the content is compiled and dumped into, which has to be a convention
and also cant be overridden by the layout engine
for example, we used to use yield a la rails for the content variable, but jade added that keyword to the language so everything randomly broke
it's kind of forcing the layout engine to do something it can't naturally by putting an extra layer on top
but since you are doing this across a number of layout engines and they all need to behave the same way, it becomes a lot hrder
and is naturally limited in how far you can take it because of the fact that you aren't actually integrating with either one directly
let me know if none of that makes sense and i'll try again haha
i've been way too deep down the static generator rabbit hole and am probably no longer sane :)