From e293db52fb64a086603c310ee94f5774a62f5c0e Mon Sep 17 00:00:00 2001 From: Danny Berger Date: Mon, 17 Mar 2014 17:17:39 -0600 Subject: [PATCH] some error pages; aws build script; optionally disable comments; environment --- .gitignore | 1 + CNAME | 1 - _config.yml | 2 ++ _deploy/aws/deploy | 31 ++++++++++++++++++ _includes/header.html | 9 +++-- _layouts/post.html | 8 +++-- error/http-400.html | 17 ++++++++++ error/http-403.html | 17 ++++++++++ error/http-404.html | 17 ++++++++++ error/http-405.html | 17 ++++++++++ .../dev}/content/header-simple.html | 0 {include/icons => static/dev/icon}/code.png | Bin .../dev/style/default-common.css | 0 .../dev/style/default-print.css | 0 .../site => static/dev/style}/pygments.css | 0 15 files changed, 113 insertions(+), 7 deletions(-) delete mode 100644 CNAME create mode 100755 _deploy/aws/deploy create mode 100644 error/http-400.html create mode 100644 error/http-403.html create mode 100644 error/http-404.html create mode 100644 error/http-405.html rename {include => static/dev}/content/header-simple.html (100%) rename {include/icons => static/dev/icon}/code.png (100%) rename include/site/default.css => static/dev/style/default-common.css (100%) rename include/site/print.css => static/dev/style/default-print.css (100%) rename {include/site => static/dev/style}/pygments.css (100%) diff --git a/.gitignore b/.gitignore index 4ad77ab..bd731ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/_build /_layouts/private-* /_site /asset diff --git a/CNAME b/CNAME deleted file mode 100644 index 14a1bcc..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -dpb587.me diff --git a/_config.yml b/_config.yml index caa29df..2952b32 100644 --- a/_config.yml +++ b/_config.yml @@ -2,3 +2,5 @@ markdown: redcarpet paginate: 7 pygments: true safe: false +environment: dev +static_version: dev diff --git a/_deploy/aws/deploy b/_deploy/aws/deploy new file mode 100755 index 0000000..6aa465a --- /dev/null +++ b/_deploy/aws/deploy @@ -0,0 +1,31 @@ +#!/bin/bash + +# args: s3cmd-config + +set -e + +[ -e _build ] && rm -fr _build + +mkdir _build + +STATIC_VERSION=`git rev-parse HEAD | cut -c -10` + +( + echo 'static_version:' "$STATIC_VERSION" ; + echo 'destination: _build/_site' + echo 'environment: prod' +) > _build/_config.yml + +jekyll build --config _config.yml,_build/_config.yml + +mv _build/_site/static/dev _build/_site/static/$STATIC_VERSION + +s3cmd sync \ + --config "$1" \ + --acl-public \ + --no-delete-removed \ + --no-preserve \ + --exclude 'private/*' \ + --verbose \ + _build/_site/ \ + s3://dpb587-us-west-2 diff --git a/_includes/header.html b/_includes/header.html index 703e1e8..ee7f2f4 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -6,9 +6,9 @@ {% if page.title != "Home" %}{{ page.title }} – {% endif %}Danny Berger - - - + + + {% if page.path %} @@ -51,6 +51,9 @@ DPB