You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gulp task does not allow us to pipe in files where we have changed the template in a previous gulp task. For example, we have templates with front matter that we remove (check out the example in the gulp-data repo), but the front matter is still rendered.
This would allow gulp tasks to, in effect, change templates before rendering them. It would also speed up rendering because it will use buffered data, avoiding an expensive call to Twig.loadRemoteContent() fetching templates from the filesystem.
This gulp task does not allow us to pipe in files where we have changed the template in a previous gulp task. For example, we have templates with front matter that we remove (check out the example in the gulp-data repo), but the front matter is still rendered.
Passing the file contents as the data property to twigOpts.
twig.js
will use the string infile.data
when you callTwig.twig(twigOpts)
. Check out thetwig.js
source where it renders a template fromparams.data
: https://github.com/twigjs/twig.js/blob/master/src/twig.exports.js#L41-L48This would allow gulp tasks to, in effect, change templates before rendering them. It would also speed up rendering because it will use buffered data, avoiding an expensive call to
Twig.loadRemoteContent()
fetching templates from the filesystem.The text was updated successfully, but these errors were encountered: