scripts/generate_post_skeleton: fixup date format

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-07-17 01:20:28 +05:30
parent 692a54e23a
commit 53010070b5
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ function create_post() {
else
title="${*}"
fi
postdate="$(date -Is)"
postdate="$(date +%Y-%m-%d)"
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\"\ndescription = \"\"\n+++\n" "${postdate}" "${postslug}" "${title}" > content/posts/"${filename}"