Code for drawings.hcoder.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- ALL_TAGS = $(shell ruby -rutils -rset -I. -e 'print picture_info_hashes.reduce(Set.new) {|memo, h| memo + h[:tags]}.to_a.join(" ")')
-
- all: tags thumbnails
- bundle exec middleman build
-
- tags:
- rm -rf source/tag && mkdir source/tag
- for tag in $(ALL_TAGS); do mkdir source/tag/$$tag && sed "s/%TAG%/$$tag/g" tag.html.erb >source/tag/$$tag/index.html.erb; done
-
- thumbnails:
- rm -f source/content/thumbnails/*.jpg source/content/thumbnails/*.png
- for ext in jpg png; do \
- for i in source/content/*.$$ext; do convert -define jpeg:size=800x800 $$i -thumbnail 295x380^ -gravity center -extent 295x380 `dirname $$i`/thumbnails/`basename $$i`; done; \
- done
-
- sync: all
- rsync -r --delete build/ drawings.hcoder.org:/var/www/virtual/drawings.hcoder.org/html/
-
- .PHONY: all tags thumbnails sync
|