_pages: Again

This commit is contained in:
Stig-Ørjan Smelror 2024-02-02 17:26:22 +01:00
parent 0480ceb497
commit e92d09f1dd

6
qsgen2
View File

@ -442,9 +442,13 @@ function _pages() {
if (${debug}) _msg debug "_pages: 1. Replacing BODY with page_content in pages_tpl using Perl"
# Use Perl for multi-line and special character handling
local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") )
else
if (${debug}) _msg debug "_pages: 2. Replacing BODY with page_content in pages_tpl using Perl"
# Use Perl for multi-line and special character handling
local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") )
fi
elif [[ ${new_updated_blogs} == "false" ]] && [[ ${blog_in_index} == "false" ]]; then
if (${debug}) _msg debug "_pages: 2. Replacing BODY with page_content in pages_tpl using Perl"
if (${debug}) _msg debug "_pages: 3. Replacing BODY with page_content in pages_tpl using Perl"
# Use Perl for multi-line and special character handling
local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") )
fi