minor fixes for js files rendering

This commit is contained in:
Jaromil 2015-12-12 19:41:02 +01:00
parent 0f717bc8df
commit 9fa56515d9
2 changed files with 5 additions and 5 deletions

2
init
View File

@ -74,7 +74,7 @@ DESCRIPTION="WebNomad, your slick and static website publisher, powered by HTML5
KEYWORDS="web, design, html"
# representative image, 1200 pixel width is full column banner, 400 is half
# representative image, 1200x630 pixels is full column banner, 400 is half
IMAGE="https://www.dyne.org/wp-content/uploads/2013/09/carciofo-webnomad.jpg"
# list of types: http://ogp.me/#types

8
render
View File

@ -189,7 +189,7 @@ EOF
[[ "$1" = "" ]] || { print "${@}"; print }
# include all css files found in views/css
jsfound=`find $DIR/views/js -name '*.js'`
jsfound=`find $DIR/views/js -type f -name '*.js'`
for j in ${(f)jsfound}; do
includejs+=(${j##*/})
done
@ -201,9 +201,9 @@ EOF
<script type="text/javascript" src="${baseurl}/js/$j"></script>
EOF
if [[ -r "$DIR"/views/js/$j ]]; then
cp -a "$DIR"/views/js/$j "$destination"/js
elif [[ -r "$SYS"/js/$i ]]; then
cp -a "$SYS"/js/$i "$destination"/js
cp -f "$DIR"/views/js/$j "$destination"/js
elif [[ -r "$SYS"/js/$j ]]; then
cp -f "$SYS"/js/$j "$destination"/js
fi
done