mylloon.fr/data/blog/posts/Makefile

21 lines
441 B
Makefile
Raw Normal View History

2024-11-12 00:29:59 +01:00
MKDIR = mkdir -p
TOUCH = touch
PRINT = echo
DATE = $(shell date '+%d-%m-%Y')
DIR = $(shell date '+%Y/%m')
FI := new
new:
$(MKDIR) $(DIR) 2> /dev/null
$(TOUCH) $(DIR)/$(FI).md
$(PRINT) "---" > $(DIR)/$(FI).md
$(PRINT) "publish: false" >> $(DIR)/$(FI).md
$(PRINT) "date: $(DATE)" >> $(DIR)/$(FI).md
$(PRINT) "draft: true" >> $(DIR)/$(FI).md
$(PRINT) "---" >> $(DIR)/$(FI).md
help:
$(PRINT) "make FI=new"