소스 검색

page vars are also available as json - converted during page-build

Andi Dittrich 8 년 전
부모
커밋
8665d862e3
4개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      dist/pages.json
  2. BIN
      dist/pages.tar
  3. BIN
      dist/pages.zip
  4. 3 0
      generator.php

+ 1 - 0
dist/pages.json

@@ -0,0 +1 @@
+{"400":{"title":"Bad Request","message":"The server cannot process the request due to something that is perceived to be a client error."},"401":{"title":"Unauthorized","message":"The requested resource requires an authentication."},"403":{"title":"Access Denied","message":"The requested resource requires an authentication."},"404":{"title":"Resource not found","message":"The requested resource could not be found but may be available again in the future."},"500":{"title":"Webservice currently unavailable","message":"An unexpected condition was encountered.\nOur service team has been dispatched to bring it back online."},"501":{"title":"Not Implemented","message":"The Webserver cannot recognize the request method."},"502":{"title":"Webservice currently unavailable","message":"We've got some trouble with our backend upstream cluster.\nOur service team has been dispatched to bring it back online."},"503":{"title":"Webservice currently unavailable","message":"We've got some trouble with our backend upstream cluster.\nOur service team has been dispatched to bring it back online."},"520":{"title":"Origin Error - Unknown Host","message":"The requested hostname is not routed. Use only hostnames to access resources."},"521":{"title":"Webservice currently unavailable","message":"We've got some trouble with our backend upstream cluster.\nOur service team has been dispatched to bring it back online."},"533":{"title":"Scheduled Maintenance","message":"This site is currently down for maintenance.\nOur service team is working hard to bring it back online soon."}}

BIN
dist/pages.tar


BIN
dist/pages.zip


+ 3 - 0
generator.php

@@ -24,6 +24,9 @@ $config = parse_ini_file($configFilename, false);
 // load pages
 $pages = require('pages.php');
 
+// store pages as json data
+file_put_contents('dist/pages.json', json_encode($pages));
+
 // load inline css
 $css = trim(file_get_contents('assets/Layout.css'));