summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bbd41c7..05df297 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ post:
SHORT_DATE=`date +"%Y-%m-%d"`; \
LONG_DATE=`date +"%a, %d %b %Y"`; \
mkdir -p posts/$$CATEGORY; \
- FILENAME=posts/$$CATEGORY/$$SHORT_DATE-`echo $$TITLE | tr -C "[:alnum:]" ' ' | tr "[:upper:]" "[:lower:]" | tr -s "[:blank:]" ' '`.html; \
+ FILENAME=posts/$$CATEGORY/$$SHORT_DATE-`printf "$$TITLE" | tr -Cs "[:alnum:]" '-' | tr "[:upper:]" "[:lower:]"`.html; \
cp $(TEMPLATE) $$FILENAME; \
sed -i '' "s/{{ title }}/$$TITLE/g" $$FILENAME; \
$$EDITOR $$FILENAME; \