Commit aa0182e7 authored by Tobias Rautenkranz's avatar Tobias Rautenkranz

Build png images from svg

parent ed5cd2e0
changelog := _includes/changelog.html.fragment
all: $(changelog)
all: $(changelog) images
jekyll build -q
rm _site/Makefile # FIXME exclude in jekyll not working
REPO := https://gitlab.com/tobiasrautenkranz/site/commit/
.PHONY: $(changelog)
$(changelog):
@echo "<dl>" > $@
@git log --pretty=format:'<dt>%n<a href="$(REPO)%H">%ai</a>%n</dt><dd>%s</dd>%n' >> $@
@echo "</dl>" >> $@
# serve locally
serve:
jekyll serve -B -D > /dev/null 2>&1
......@@ -13,14 +21,20 @@ kill:
serve-fg:
jekyll serve -D
REPO := https://gitlab.com/tobiasrautenkranz/site/commit/
# images
img/%.png: img/%.svg
inkscape --without-gui --export-png=$@ --export-dpi=70 $< > /dev/null
optipng -quiet $@
.PHONY: $(changelog)
$(changelog):
@echo "<dl>" > $@
@git log --pretty=format:'<dt>%n<a href="$(REPO)%H">%ai</a>%n</dt><dd>%s</dd>%n' >> $@
@echo "</dl>" >> $@
# images to be built
image_objects :=
include image_objects.mk
image_objects_full_path := $(addprefix img/, $(image_objects))
.PHONY: images
images: $(image_objects_full_path)
# clean
.PHONY: clean
clean:
rm -f $(changelog)
......@@ -28,7 +42,9 @@ clean:
.PHONY: dist-clean
dist-clean: clean
jekyll clean
rm -f $(image_objects_full_path)
# lint
mld_rules := "~MD002,~MD012,~MD033"
.PHONY: lint
......
......@@ -23,3 +23,5 @@ gems:
exclude:
- Gemfile
- Gemfile.lock
- Makefile
- image_objects.mk
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment