summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index f7acbd1..8dcd6e5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,17 @@
# Written for FreeBSD make(1), or pmake. Not tested with GNU make.
EDITOR = $$EDITOR
-POST_T = templates/template.html
+POST_T = includes/template.php
.PHONY: serve post
serve:
- python3.7 -m http.server 3000
+ php -S localhost:8000
-post:
- @read -p "Title: " TITLE; \
+draft:
+ @read -rp "Title: " TITLE; \
SHORT_DATE=`date +"%Y-%m-%d"`; \
- FILENAME=posts/$$SHORT_DATE-`printf "$$TITLE" | tr -Cs "[:alnum:]" '-' | tr "[:upper:]" "[:lower:]"`.html; \
- cp $(POST_T) $$FILENAME; \
+ FILENAME=drafts/$$SHORT_DATE-`printf "$$TITLE" | tr -Cs "[:alnum:]" '-' | tr "[:upper:]" "[:lower:]"`.php; \
sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \
$$EDITOR $$FILENAME
+