dovetailer icon indicating copy to clipboard operation
dovetailer copied to clipboard

Content.json should be optional

Open joeyfigaro opened this issue 8 years ago • 2 comments

The project I'm working on is not relying on the compiler for inserting dynamic data, so we don't need config files for our templates. It'd be great if the compiler left {{ data }} tokens untouched (ready for being replaced later in the chain) if there was no config available for the template.

joeyfigaro avatar Jan 20 '17 17:01 joeyfigaro

that's a good idea! in the meantime, you can put those {{ data }} strings in the content.json file.

example handlebars:

<h1>{{ headline }}</h1>

example content.json:

{
    headline: "{{ data }}"
}

i know this is kind of annoying! i'll think about a better long-term solution.

maxlapides avatar Jan 20 '17 18:01 maxlapides

That's a great suggestion @maxlapides - thanks! Could be much worse, and totally takes care of what we need for the time being.

joeyfigaro avatar Jan 20 '17 18:01 joeyfigaro