Updating pipeline to generate logs

This commit is contained in:
2023-01-16 15:42:42 -08:00
parent 4e8d321bfa
commit 13b5578574
4 changed files with 22 additions and 5 deletions

View File

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