diff options
author | 53hornet <atc@53hor.net> | 2021-07-28 10:58:58 -0400 |
---|---|---|
committer | 53hornet <atc@53hor.net> | 2021-07-28 10:58:58 -0400 |
commit | bfaccc32571df8a02f69518d8864244efba3b5b5 (patch) | |
tree | cc71a44054af00e73d0db2a1c79c347db3f31327 /Makefile | |
parent | dd75b4a341925e4ba3408b018941241d4317dd9f (diff) | |
download | 53hor-bfaccc32571df8a02f69518d8864244efba3b5b5.tar.xz 53hor-bfaccc32571df8a02f69518d8864244efba3b5b5.zip |
php site, templating and partials, faster index generation
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 + |