diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 + |