17 lines
223 B
Bash
17 lines
223 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
[[ "$1" = "" ]] && echo No filename given for new post\! && exit 1
|
||
|
|
||
|
file="$1"
|
||
|
|
||
|
cat << EOF > "$file"
|
||
|
---
|
||
|
title: $(basename "$file")
|
||
|
date: $(date '+%F')
|
||
|
draft: false
|
||
|
description:
|
||
|
category: article
|
||
|
image:
|
||
|
---
|
||
|
EOF
|