Added support for static files

This commit is contained in:
Yuki Joou 2023-08-16 19:33:49 +02:00
parent 6b899f8fb3
commit b0338b79b5

View file

@ -30,6 +30,7 @@ set -e;
TEMPLATES_PATH=template
OUTPUT_PATH=public
SOURCES_PATH=src
STATIC_RESOURCES_PATH=static
[[ -e $TEMPLATES_PATH ]] ||
(
@ -79,3 +80,9 @@ for file in $(find $SOURCES_PATH/ -iname '*.html'); do
page="${raw_page//\[ title \]/$page_title}"
echo -n "$page" > $OUTPUT_PATH/$clean_path;
done;
echo 'Generation: done!'
[[ -e $STATIC_RESOURCES_PATH/ ]] && (echo "Copying static assets..." && cp -r $STATIC_RESOURCES_PATH/* $OUTPUT_PATH)
echo "Check $OUTPUT_PATH/ for the processed files"