Providing data models to use in Gulp Nunjucks templates
I'm looking to use Gulp to render my Nunjucks templates with either gulp-nunjucks or gulp-nunjucks-render . Is there a way I can pass one or a series of .json files to the templating package to use the JSON data in my nunjucks templates? Ideally I'd have a models/ directory with each page having corresponding page.json file with contents to be used in that template. I'd like to know if it's possible with either of the above plugins and if so how it can be implemented. Any examples for a single or series of .json files would be very useful. Look into using gulp-data https://www.npmjs.org