I am trying to use Assemble to generate multiple static files from multiple data files using one template.
In more detail, I have 12 JSON files representing the data for cooking recipes, and one Handlebars file, recipe.hbs, with a layout file of default.hbs.
I want to output an HTML file based on each of those JSON files.
File Structure:
/templates
/data
recipe1.json
recipe2.json, etc.
/layouts
default.hbs
/pages
recipe.hbs
Output:
/output
recipe1.html (based on recipe1.json)
recipe2.html (based on recipe2.json), etc.
It sounds like this should be possible using collections, but I can't seem to wrap my head around how to set up the Grunt file.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…