New post for making detergent and stuff

This commit is contained in:
2023-07-05 21:43:00 -07:00
parent 13fdadd1bf
commit 3545f76842
2 changed files with 80 additions and 2 deletions

View File

@@ -2,9 +2,10 @@
[[ "$1" = "" ]] && echo No filename given for new post\! && exit 1
file="$(basename $1)"
name="$(basename -s .md $1)"
cat << EOF | tee content/posts/"$file.md"
echo Creating new post content/posts/$name.md with metadata:
cat << EOF | tee content/posts/"$name.md"
---
title: $(basename -s .md "$file")
date: $(date '+%F')