acoeur/bin/_commands/create.sh

15 lines
222 B
Bash
Raw Normal View History

2022-10-26 23:12:29 +02:00
#!/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"