diff --git a/qsgen2 b/qsgen2 index 8ad08a6..bf79fb0 100755 --- a/qsgen2 +++ b/qsgen2 @@ -623,7 +623,7 @@ function _blogs() { local debug=true else # If you want to debug this function only, set this to true - local debug=true + local debug=false fi # Running function _list_blogs @@ -909,7 +909,9 @@ function _blog_index() { local blog_index_tpl=$(<${project_dir}/themes/${theme}/blog_index.tpl) local blog_index_list=$(<${project_dir}/blog/index.tmp.html) + if (${debug}) _msg debug "_blog_index: Replacing sitename and tagline" local blog_index_content=$(echo "${blog_index_tpl}" | perl -pe "s|#sitename|${site_name}|gs; s|#tagline|${site_tagline}|gs") + if (${debug}) _msg debug "_blog_index: Replacing BODY with content of ${project_dir}/blog/index.tmp.html" blog_index_content=$( awk -v new_body="$blog_index_list" '{sub(/BODY/, new_body)} 1' <(echo "${blog_index_content}") ) echo "${blog_index_content}" > ${www_root}/blog/index.html