generate_post_skeleton: Add empty description field

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-01-31 11:19:23 +05:30
parent 090a719c38
commit 73a5cd59a7
No known key found for this signature in database
GPG Key ID: C2E74282C2133D62

View File

@ -13,7 +13,7 @@ function create_post() {
postdate="$(date -Is)"
postslug="$(echo "${title}" | tr -dc '[:alnum:][:space:]\n\r' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')"
filename="${postslug}.md"
printf "+++\ncategories = []\ndate = %s\ndraft = true\nslug = \"%s\"\ntags = []\ntitle = \"%s\"\n+++\n" "${postdate}" "${postslug}" "${title}" > content/posts/"${filename}"
printf "+++\ncategories = []\ndate = %s\ndraft = true\nslug = \"%s\"\ntags = []\ntitle = \"%s\"\ndescription = \"\"\n+++\n" "${postdate}" "${postslug}" "${title}" > content/posts/"${filename}"
echo "content/posts/${filename} created!"
}