Add Lisp skeleton, port blog
author |
Steve Losh <steve@stevelosh.com> |
date |
Sat, 04 Jan 2020 23:36:37 -0500 |
parents |
344fc7b12455 |
children |
65c17aa7972b |
.PHONY: clean generate serve deploy css
files := $(shell hg files)
less := $(shell ffind --literal '.less')
style := $(subst .less,.css,$(less))
photos := $(shell ffind 'static/media/images/photography/photos/.*/.*.jpg' --entire)
thumbs := $(subst photos,thumbnails,$(photos))
THUMBNAIL_CMD = convert $< -resize "200^>" -gravity center -crop 200x200+0+0 -strip $@
# Main ------------------------------------------------------------------------
public/index.html: $(files) # $(style)
hugo -t stevelosh
generate: public/index.html
clean:
rm -rf public
serve:
hugo server -t stevelosh -D
deploy: public/index.html
rsync -avz ./public/ sl:/var/www/stevelosh.com
# CSS -------------------------------------------------------------------------
# css: $(style)
# static/media/css/%.css: static/media/css/%.less
# lessc $< > $@
# Image Gallery Hell ----------------------------------------------------------
thumbnails: $(thumbs)
static/media/images/photography/thumbnails/plants/%.jpg: static/media/images/photography/photos/plants/%.jpg
$(THUMBNAIL_CMD)
static/media/images/photography/thumbnails/scotland/%.jpg: static/media/images/photography/photos/scotland/%.jpg
$(THUMBNAIL_CMD)
static/media/images/photography/thumbnails/iceland/%.jpg: static/media/images/photography/photos/iceland/%.jpg
$(THUMBNAIL_CMD)
static/media/images/photography/thumbnails/dancing/%.jpg: static/media/images/photography/photos/dancing/%.jpg
$(THUMBNAIL_CMD)