_add_blog_list_to_index: Fix write to disk

This commit is contained in:
Stig-Ørjan Smelror 2024-02-02 16:15:45 +01:00
parent 38d37b97fa
commit 5a2b551ef9

2
qsgen2
View File

@ -674,7 +674,7 @@ function _add_blog_list_to_index() {
if (${debug}) _msg debug "_pages: Inserting blog list to index.html"
local blog_index_list=$(<${project_dir}/blog/index.tmp.html)
local site_index_file=$(<${www_root}/index.html)
awk -v new_body="$site_index_file" '{sub(/BLOGINDEX/, new_body)} 1' <(echo "${blog_index_list}")
echo "${site_index_file}" | awk -v new_body="${blog_index_list}" '{sub(/BLOGINDEX/, new_body)} 1' > "${www_root}/index.html"
fi
}