Using Assemble, generate HTML files from multiple data files using one template file?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 02:42:33

I created this gist: https://gist.github.com/doowb/ca6f3321a05f6ac727e5 that has the code in the Gruntfile.js file for dynamically creating a pages list with the combined recipe template and the recipe data.

These lines are the key to creating the pages array. They could be moved into another file and required in to make the grunt file cleaner.

This line adds the pages array to the pages options on assemble so they'll be built.

If you don't have any other pages to be built, use this line to set the dest without pulling in any other pages.

Hope this helps.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!