From a95b94189c6d9ca46f5a1b165d4b179a8abc3458 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Mon, 8 Feb 2021 21:41:00 +0700 Subject: Update post creation script --- newpost.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/newpost.sh b/newpost.sh index a30aafd..cc1025b 100755 --- a/newpost.sh +++ b/newpost.sh @@ -4,8 +4,9 @@ printf "Tags: " read tags printf "Categories: " read categories -name="_posts/$(date -I)-${title,,}" -name=${name// /-}.md +printf "Ref: " +read ref +name="_posts/$(date -I)-${ref}.md" _date=$(date "+%Y-%m-%d %T %z") echo $name echo "---" > "$name" @@ -14,5 +15,7 @@ echo "title: \"$title\"" >> "$name" echo "date: $_date" >> "$name" echo "tags: $tags" >> "$name" echo "categories: $categories" >>"$name" +echo "lang: en" >>"$name" +echo "ref: $ref" >>"$name" echo "---" >> "$name" vim $name -- cgit 1.4.1