acoeur/bin/_commands/create.sh
2022-11-05 22:23:24 +01:00

16 lines
269 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"
chmod -R g+rw "content/$kind/$page"
chgrp -R www-data "content/$kind/$page"
./ac_route.sh "$dir/$page" _index.md