summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
author53hornet <atc@53hor.net>2021-07-28 10:58:58 -0400
committer53hornet <atc@53hor.net>2021-07-28 10:58:58 -0400
commitbfaccc32571df8a02f69518d8864244efba3b5b5 (patch)
treecc71a44054af00e73d0db2a1c79c347db3f31327 /Makefile
parentdd75b4a341925e4ba3408b018941241d4317dd9f (diff)
download53hor-bfaccc32571df8a02f69518d8864244efba3b5b5.tar.xz
53hor-bfaccc32571df8a02f69518d8864244efba3b5b5.zip
php site, templating and partials, faster index generation
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
+