Assemble を使用して、1 つのテンプレートを使用して複数のデータ ファイルから複数の静的ファイルを生成しようとしています。
より詳細には、料理レシピのデータを表す 12 個の JSON ファイルと、default.hbs のレイアウト ファイルを含む 1 つのハンドルバー ファイル、recipe.hbs があります。
これらの各 JSON ファイルに基づいて HTML ファイルを出力したいと考えています。
ファイル構造:
/templates
/data
recipe1.json
recipe2.json, etc.
/layouts
default.hbs
/pages
recipe.hbs
出力:
/output
recipe1.html (based on recipe1.json)
recipe2.html (based on recipe2.json), etc.
これはコレクションを使用して可能であるように思えますが、Grunt ファイルの設定方法について頭を悩ませているようには見えません。
ありがとう。