scripts/generate_post_skeleton: sort frontmatter keys

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-07-22 06:06:36 +05:30
parent 9ffa66ade7
commit 803bdf5eaf
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ function create_post() {
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}"
printf "+++\ncategories = []\ndate = %s\ndescription = \"\"\ndraft = true\nslug = \"%s\"\ntags = []\ntitle = \"%s\"\n+++\n" "${postdate}" "${postslug}" "${title}" > content/posts/"${filename}"
echo "content/posts/${filename} created!"
}