2016-10-01 5 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

좋아, 나는 해결책을 발견 :

내용을/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" 
|}