[WIP] Initial commit for qsgen3

This commit is contained in:
2025-05-30 20:37:56 +02:00
parent 106b66753f
commit 75105821fd
138 changed files with 12471 additions and 7 deletions

View File

@ -0,0 +1,30 @@
if [[ ${globaldebug} == "true" ]]; then
local debug=true
else
local debug=false
fi
if ([[ ${config[site_blog]} == "false" ]] && [[ ${new_updated_blogs} = "true" ]]); then
if (${debug}) _msg debug "${0:t}_msg_1" "${config[site_blog]}"
if (${debug}) _msg debug "${0:t}_msg_2" "${new_updated_blogs}"
if (${debug}) _msg debug "${0:t}_msg_3"
if (${debug}) _msg debug "${0:t}_msg_4" " ${config[site_blog]}"
_msg std "${0:t}_msg_5" " ${config[site_root]}/blog/index.html"
local blog_index_tpl=$(<${config[project_root]}/themes/${config[site_theme]}/blog_index.tpl)
local blog_index_list=$(<${config[project_root]}/blog/index.tmp.html)
if (${debug}) _msg debug "${0:t}_msg_6"
local blog_index_content=$(echo "${blog_index_tpl}" | perl -pe "s|#sitename|${config[site_name]}|gs; s|#tagline|${config[site_tagline]}|gs")
if (${debug}) _msg debug "${0:t}_msg_7" " ${config[project_root]}/blog/index.tmp.html"
blog_index_content=$( awk -v new_body="$blog_index_list" '{sub(/BODY/, new_body)} 1' <(echo "${blog_index_content}") )
if (${debug}); then
_msg debug "${0:t}_msg_8" " ${config[site_root]}/blog/index.html"
_msg debug "${0:t}_msg_9" " ${#blog_index_content}"
fi
echo "$blog_index_content" > ${config[site_root]}/blog/index.html
_f_last_updated ${config[site_root]}/blog/index.html
fi