0
我有一個簡單的網站使用Rails 3.2。這只是一個佈局,一些視圖,一些CSS和很少的JavaScript。如何從Rails項目生成靜態網站?
我想爲我的網站中的每個URL的輸出生成靜態HTML文件,我想將它們轉儲到我的Rails項目目錄之外的某個目錄中。所以我會有
[target directory]/index.html
[target directory]/products/my-category-1/index.html
[target directory]/products/my-category-2/index.html
[target directory]/products/my-category-3/index.html
[target directory]/products/my-category-1/my-product-1.html
[target directory]/products/my-category-1/my-product-2.html
[target directory]/products/my-category-1/my-product-3.html
[target directory]/products/my-category-2/my-product-1.html
[target directory]/products/my-category-2/my-product-2.html
[target directory]/products/my-category-2/my-product-3.html
[target directory]/products/my-category-3/my-product-1.html
[target directory]/products/my-category-3/my-product-2.html
[target directory]/products/my-category-3/my-product-3.html
有沒有可用於此的寶石或技術?
或者我應該創建一個rake任務,它在每個URL上執行wget並將輸出寫入目標目錄?我還必須確保CSS和JS文件也被下拉幷包含在目標目錄中。