mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Avoid leading and trailing dashes in blog post slugs.
This commit is contained in:
@@ -73,7 +73,7 @@ function jekyll {
|
||||
JTEMPLATE+="category: Blog\n"
|
||||
JTEMPLATE+="---\n\n"
|
||||
TITLE=${@[2,-1]}
|
||||
SLUG=$(echo -n ${TITLE}|tr A-Z a-z|tr -c -s -- a-z0-9 -)
|
||||
SLUG=$(echo -n ${TITLE}|tr A-Z a-z|tr -c -s -- a-z0-9 -|sed 's/^-*\([^-].*[^-]\)-*$/\1/')
|
||||
DATE=`date +%Y-%m-%d`
|
||||
|
||||
case "${1:-help}" in
|
||||
|
||||
Reference in New Issue
Block a user