1
0
Fork 0

`make newpost` added, moved Makefile

master
Ambrose Chua 2016-09-17 17:17:59 +08:00
parent 3611218eb9
commit 8b54adb11f
1 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,3 @@
# A makefile to help encrypt posts with a password
# From https://gist.github.com/ambrosechua/e88bf467b3a0f2f14ff5
SHELL := /bin/zsh
DIRECTORY = "_posts"
@ -81,6 +78,13 @@ decrypt:
fi;\
done;
newpost:
ID="$$(echo 0000$$(($$(ls $(DIRECTORY)/ | wc -l) + 1)) | tail -c 5)";\
FILENAME="$$(date +%y-%m-%d)-$$ID$(EXT_FILE)";\
FILE="$(DIRECTORY)/$$FILENAME";\
echo "Opening file $$FILE...";\
$$EDITOR $$FILE;
server:
@make serve
serve: