add makefile

This commit is contained in:
Mylloon 2024-11-12 00:29:59 +01:00
parent e1448bd773
commit d9f3d64c55
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 32 additions and 1 deletions

13
.gitignore vendored
View file

@ -5,4 +5,15 @@
docker-compose.yml docker-compose.yml
/.vscode /.vscode
/data
# Data
data/index.md
data/contacts/*
data/cours/*
data/projects/*
# Blog
data/blog/*.md
data/blog/posts/*
!data/blog/posts/Makefile

20
data/blog/posts/Makefile Normal file
View file

@ -0,0 +1,20 @@
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"