From 0e106be1dc6d52ce14f1291ac1ec1149007f918c Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 16 Oct 2024 20:55:00 +0200 Subject: generate post info using git --- makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 46f6162..95b7666 100644 --- a/makefile +++ b/makefile @@ -1,3 +1,5 @@ +.PHONY: FORCE + JEKYLL_ENV ?= development # JEKYLL_ENV ?= production @@ -10,12 +12,19 @@ JEKYLL_BUILD_ARGS += --destination $(WEBROOT) # installed GEMS = Gemfile.lock -build: $(GEMS) +POSTS := $(wildcard _items/*) +POST_META := $(patsubst _items/%.md,_data/post/%.yml,$(POSTS)) + +build: $(GEMS) $(POST_META) FORCE bundle exec jekyll build $(JEKYLL_BUILD_ARGS) $(GEMS): Gemfile bundle install --quiet -clean: +_data/post/%.yml: _items/%.md + @mkdir -p _data/post + _scripts/postinfo $< > $@ + +clean: FORCE $(RM) -r $(WEBROOT) -- cgit v1.2.3