Is it possible to compile json files to html using templates in Assemble.io. And if it is possible, how can I setup my gruntfile to do so?
My folder structure:
- Data
- productlist1.json
- productlist2.json
- productlist3.json
- productdetail1.json
- productdetail2.json
- Templates
- product-listing.hbs
- product-detail.hbs
- Layouts
- main.hbs
- Partials
- ...
HTML result
I want to generate the following html files
- productlist1.html
- productlist2.html
- productlist3.html
- productdetail1.html
- productdetail2.html
Example productlist1.json file
{
"template": "product-listing.json",
"products": [
{
"name": "product1",
"price": "€ 2,40"
},
{
"name": "product2",
"price: "€ 1,40"
}
]
}