diff options
Diffstat (limited to 'bin/statics-generate.sh')
-rwxr-xr-x | bin/statics-generate.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/statics-generate.sh b/bin/statics-generate.sh new file mode 100755 index 0000000..9c2fa92 --- /dev/null +++ b/bin/statics-generate.sh @@ -0,0 +1,16 @@ +#!/bin/bash +CONFIG=$1 +CONTENT_DIR=$2 +OUTPUT_DIR=$3 +cat $1 | + jq -r '.[] | .content, .header, .url' | + while read CONTENT_FILE + do + read HEADER + read OUTPUT_FILE + if [ -n "$CONTENT_FILE" ] + then + python scripts/statics-compile.py $CONTENT_DIR/$CONTENT_FILE "$HEADER" > $OUTPUT_DIR/$OUTPUT_FILE + python scripts/menus-write.py $OUTPUT_DIR/$OUTPUT_FILE $OUTPUT_DIR/.menu.html + fi + done |