acoeur/bin/_commands/create.sh
2022-10-26 23:12:29 +02:00

15 lines
222 B
Bash
Executable File

#!/bin/sh
dir=$1 file=$2
page=${file%.create}
kind=$(cat "$dir/$file")
echo "Creating content/$kind/$page"
hugo --source=.. new "content/$kind/$page"
# Important to automated tests
chmod g+w "../content/$kind/$page"