aboutsummaryrefslogtreecommitdiff
path: root/bin/new
blob: 825d96682ec59af8e9018b1f5db42f93dd356cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
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