From b78d0e5a6710fe75a3b60dbabe4de19f7126919a Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 4 Jan 2012 23:09:00 -0500 Subject: [PATCH] Added blog page --- Makefile | 15 +++++++++++++-- includes/header.html | 1 + style.css | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6e73986..d987e08 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ output_html := $(addprefix $(outdir)/, $(input_html)) output_images := $(addprefix $(outdir)/, $(input_images)) output_scripts := $(addprefix $(outdir)/, $(input_scripts)) -.PHONY: default clean +.PHONY: default clean blog default: $(outdir) $(output_html) $(output_images) \ - $(output_scripts) $(outdir)/style.css + $(output_scripts) $(outdir)/style.css blog $(outdir): mkdir -p $@ $@/images $@/scripts/ex @@ -37,5 +37,16 @@ $(outdir)/%.html: %.html $(header) $(footer) | $(outdir) | sed 's/^ \+//' \ > $@ +# requires git-weblog from mikegerwitz's git-supp package +blog: + @[ "$$( which git-weblog )" ] || ( echo "Please add git-weblog to PATH" && false ) + git log --log-size --format="%H%n%B" master \ + | grep -A1 '^log size \([5-9][0-9]\{2,\}\|[0-9]\{4,\}\)$$' \ + | grep -o '^[a-z0-9]\+$$' \ + | xargs git weblog 0.1.0 \ + | cat $(header) - $(footer) \ + | sed 's/\( "$(outdir)/blog.html" + clean: ${RM} -r webroot diff --git a/includes/header.html b/includes/header.html index 4d09e6b..8deb778 100644 --- a/includes/header.html +++ b/includes/header.html @@ -17,6 +17,7 @@