add makefile
This commit is contained in:
parent
e1448bd773
commit
d9f3d64c55
2 changed files with 32 additions and 1 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -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
20
data/blog/posts/Makefile
Normal 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"
|
Loading…
Reference in a new issue