aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-16 20:55:00 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-16 20:55:00 +0200
commit0e106be1dc6d52ce14f1291ac1ec1149007f918c (patch)
tree8ad119b0a0569bf549230eff1de92d6d75b07f75 /makefile
parent9b4fb13f94bc8fa2f7d50519652bead8ede4ee3a (diff)
generate post info using gitjekyll
Diffstat (limited to 'makefile')
-rw-r--r--makefile13
1 files changed, 11 insertions, 2 deletions
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)