new.sh: remove slash of string title
This commit is contained in:
parent
a8f3ceb8bf
commit
64c731759f
4
new.sh
4
new.sh
@ -13,6 +13,8 @@ printf '%s' "Enter Category: "
|
||||
read -r
|
||||
category="$REPLY"
|
||||
|
||||
title="${title/\//}"
|
||||
|
||||
# Slug | lowercase, without accent mark
|
||||
lug=$(printf '%s' "${title// /-}")
|
||||
slug=$(echo "$lug" | sed 'y/áÁàÀãÃâÂéÉêÊíÍóÓõÕôÔúÚñÑçÇ/aAaAaAaAeEeEiIoOoOoOuUnNcC/' | sed -e 's/\(.*\)/\L\1/')
|
||||
@ -35,4 +37,4 @@ printf '%s\n%s\n%s\n%s\n%s\n%s\n' "$o_author"\
|
||||
"$o_date"\
|
||||
"$o_slug"\
|
||||
"$o_tag"\
|
||||
"$o_title" > "content/$slug.md"
|
||||
"$o_title" > "content/articles/$slug.md"
|
||||
|
Loading…
x
Reference in New Issue
Block a user