diff --git a/qsgen2 b/qsgen2 index bd2f423..2b13e91 100755 --- a/qsgen2 +++ b/qsgen2 @@ -753,7 +753,7 @@ function _blog_idx_for_index() { function _blog_index() { - local debug=false + local debug=true # This function generates the /blog/index.html file that gets its data from _blog_list_for_index() # ${new_updated_blogs} comes from the function _blogs if anything new or updated is detected @@ -762,14 +762,14 @@ function _blog_index() { if (${debug}) _msg debug "Running function _blog_index" if (${debug}) _msg debug "_blog_index: blog_in_index = ${blog_in_index}" - _msg std "Generating the Blog index file" + _msg std "- Generating the Blog index file" local debug=false local blog_index_tpl=$(<${project_dir}/themes/${theme}/blog_index.tpl) local blog_index_list=$(<${project_dir}/blog/index.tmp.html) - local blog_index_content=$( awk -v new_body="$blog_index_list" '{sub(/BODY/, new_body)} 1' <(echo "${blog_index_tpl}") ) - blog_index_content=$(echo "${blog_index_tpl}" | perl -pe "s|#sitename|${site_name}|gs; s|#tagline|${site_tagline}|gs") + local blog_index_content=$(echo "${blog_index_tpl}" | perl -pe "s|#sitename|${site_name}|gs; s|#tagline|${site_tagline}|gs") + blog_index_content=$( awk -v new_body="$blog_index_list" '{sub(/BODY/, new_body)} 1' <(echo "${blog_index_tpl}") ) echo "${blog_index_content}" > ${www_root}/blog/index.html _f_last_updated ${www_root}/blog/index.html