2016-10-01 13 views
0

私は/manfest.jsonファイルを提供しようとしています - それはアンドロイドのためのいくつかのアイコン情報を持っています。Wintersmith serve /manifest.json

{ 
    "name": "woot.io", 
    "icons": [ 
     { 
      "src": "\/android-chrome-192x192.png", 
      "sizes": "192x192", 
      "type": "image\/png" 
     }, 
     { 
      "src": "\/android-chrome-512x512.png", 
      "sizes": "512x512", 
      "type": "image\/png" 
     } 
    ], 
    "theme_color": "#0d87e9", 
    "display": "standalone" 
    } 

ファイルを/ contentsに入れると、Wintersmithはそれを/manifest.htmlにレンダリングします。いいえ。 /contents/manifest.jsonでこれにより

{ 
    "template": "manifest.jade", 
    "filename": "manifest.json" 
} 

は、テンプレートを使用しますが、私は、出力JSONにジェイドを取得するための構文は見つかっていません。より良い方法がありますか?私は何かが簡単に欠けているように感じる。

答えて

1

[OK]を、私は解決策が見つかりました:

コンテンツを/ manifest.md

--- 
template: manifest.jade 
filename: manifest.json 
--- 

テンプレート/ manifest.jade

|{ 
| "name": "woot.io", 
| "icons": [ 
|  { 
|   "src": "\/android-chrome-192x192.png", 
|   "sizes": "192x192", 
|   "type": "image\/png" 
|  }, 
|  { 
|   "src": "\/android-chrome-512x512.png", 
|   "sizes": "512x512", 
|   "type": "image\/png" 
|  } 
| ], 
| "theme_color": "#0d87e9", 
| "display": "standalone" 
|}