default website template files moved to lib

this frees up web/templates/ for user defined templates outside of
source control
master
Ken Barbour 2022-07-08 10:10:24 -04:00
parent 780429be3d
commit b0967b12b3
10 changed files with 5 additions and 1 deletions

View File

@ -9,10 +9,14 @@ WXRX_WEB_PUBDIR=${WXRX_WEB_PUBDIR:="${WXRX_WEB_DIR}/public"}
# @output path to template
# @return non-zero if path does not exist
function template_path() {
file=${WXRX_WEB_TEMPLATES}/${1}.template
local file=${WXRX_WEB_TEMPLATES}/${1}.template
local fallback="${rootdir}/lib/web-templates/${1}.template"
if [ -f "$file" ]; then
echo $file
return
elif [ -f "$fallback" ]; then
echo $fallback
return
fi
return 1
}