diff options
author | Paul Duncan <pabs@pablotron.org> | 2021-10-15 01:41:13 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2021-10-15 01:41:13 -0400 |
commit | 67e94d999a9432e404dd773b9a6a8ef3c4b73493 (patch) | |
tree | 83916d342efc4f7bb7b5236095d319e0db51d608 /bin/new | |
parent | cf5c64562b4f3d8992efc77fdf7878607443d8fa (diff) | |
download | pablotron.org-67e94d999a9432e404dd773b9a6a8ef3c4b73493.tar.bz2 pablotron.org-67e94d999a9432e404dd773b9a6a8ef3c4b73493.zip |
add minimal README.md and bin/
Diffstat (limited to 'bin/new')
-rwxr-xr-x | bin/new | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,12 @@ +#!/bin/bash + +# script to generate new sites and projects + +if [ "$1" = 'post' ]; then + DATE=$(date +%Y-%m-%d) + exec hugo new --editor $EDITOR posts/"$DATE"-"$2".md +elif [ "$2" = 'project' ]; then + exec hugo new --editor $EDITOR projects/"$2".md +else + echo "unknown type: $1" +fi |