~huyngo/huyngo.srht.site

a95b94189c6d9ca46f5a1b165d4b179a8abc3458 — Ngô Ngọc Đức Huy 8 months ago 6c11475
Update post creation script
1 files changed, 5 insertions(+), 2 deletions(-)

M newpost.sh
M newpost.sh => newpost.sh +5 -2
@@ 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