diff --git a/.gitignore b/.gitignore index cadb5ef..e5d75c4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,15 @@ docker-compose.yml /.vscode -/data + +# Data +data/index.md + +data/contacts/* +data/cours/* +data/projects/* + +# Blog +data/blog/*.md +data/blog/posts/* +!data/blog/posts/Makefile diff --git a/data/blog/posts/Makefile b/data/blog/posts/Makefile new file mode 100644 index 0000000..ce7d29d --- /dev/null +++ b/data/blog/posts/Makefile @@ -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"