These notes are for developers wanting to create or modify error pages in this repository.
git clone git@github.com:tedconf/error_pages.git- Change into the new directory
npm install
After installing development dependencies (instructions above), simply run:
npm start
Gulp will build the error pages, start a server, and open a new window in your default browser listing the contents of the dist folder for you to preview error pages.
Output will be regenerated in the dist folder for each change you make.
Source for the HTTP status pages can be found in src/statuses.
Each status page is generated from a markdown file with some YAML front matter. Adding a new error page is as simple as creating a new .md file, named according to its HTTP status code.
Templates used to generate the surrounding HTML are kept in src/templates. src/templates/status.hbs is used for the markdown-based error pages. Custom templates can also be added to this directory (e.g. src/templates/maintenance.hbs) and will each generate their own HTML page.
CSS is kept in src/styles and src/assets. Any CSS or image assets referenced in the templates will be inlined automatically during the build process so that the static output is as portable as possible.
npm run buildand commit new dist outputnpm version [major | minor | patch]npm publish
After doing the above:
chewbacca buildpush -v #.#.#
Once that's done, update the "Image" property of the error-pages container in chewbacca/ecs_task_definition-staging-master-us-east-1.json according to the new value in .docker_image_latest_version and:
chewbacca deploy -e staging
Once that's done, you can preview your changes in the staging environment: