mylloon.fr/data/blog/posts/Makefile

21 lines
441 B
Makefile
Raw Permalink 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')
2024-11-17 18:36:33 +01:00
PH := new
2024-11-12 00:29:59 +01:00
new:
$(MKDIR) $(DIR) 2> /dev/null
2024-11-17 18:36:33 +01:00
$(TOUCH) $(DIR)/$(PH).md
$(PRINT) "---" > $(DIR)/$(PH).md
$(PRINT) "publish: false" >> $(DIR)/$(PH).md
$(PRINT) "date: $(DATE)" >> $(DIR)/$(PH).md
$(PRINT) "draft: true" >> $(DIR)/$(PH).md
$(PRINT) "---" >> $(DIR)/$(PH).md
2024-11-12 00:29:59 +01:00
help:
2024-11-17 18:36:33 +01:00
$(PRINT) "make PH=new"