0
我正在使用grunt.js和assemble創建一個靜態站點。我有用於使用組裝構建頁面data.json文件:彙編中的輸出目錄結構
{
"articles": [
{
"author": "Brian",
"headline": "A Generation on the Hook 1",
"body": "cars, and start businesses by means of debt",
"slug" : "n-hook1",
"publish_on": "2014-10-10T04:00:00+00:00",
"url": "http://example.com/2014/oct/08/n-hook1/",
},
{
"author": "Brian",
"headline": "A Generation on the Hook 2",
"body": "As millions go to college, buy homes,",
"slug" : "n-hook2",
"publish_on": "2014-10-12T04:00:00+00:00",
"url": "http://example.com/2014/oct/08/n-hook2/",
},
],
}
我想在以下目錄中創建輸出這樣的日期:2014年/月/ 08 /正hook1/index.html的。我如何在彙編中創建目錄?
這甚至有可能與assemble.io?如果有更好的東西,讓我知道。我對js世界很陌生,想要一些方向。我確實看到this question,但這似乎涉及將文件放在不同的目錄中。也許我必須寫一個幫手?如果是這樣,我不知道從哪裏開始。
我喜歡組裝,因爲生成的頁面完全在客戶端渲染,而我只是呈現json數據。不確定是否有更好的東西。