blog/newpost.sh

8 lines
184 B
Bash
Executable file

#! /bin/sh
filename=`echo "${@:1}" | sed "s/ /_/g"`
echo "---
title: \"${@:1}\"
date: $(date '+%Y-%m-%dT%H:%M:%S')+03:00
tags: []
---
" > content/posts/$(date '+%Y-%m-%d')-$filename.md