Working on _blog_idx_for_index

This commit is contained in:
Stig-Ørjan Smelror 2024-01-30 14:52:17 +01:00
parent aef029b426
commit 8287b77f44

4
qsgen2
View File

@ -532,6 +532,8 @@ function _blog_idx_for_index() {
local debug=true local debug=true
echo "${yellow}_blog_idx_for_index: Initiating function${end}"
local blog_list_tpl=$(<${project_dir}/templates/${theme}/blog_list.tpl) local blog_list_tpl=$(<${project_dir}/templates/${theme}/blog_list.tpl)
# Truncate file before writing new one # Truncate file before writing new one
@ -568,9 +570,11 @@ function _blog_idx_for_index() {
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|BLOGDATE|${bdate}|g") blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|BLOGDATE|${bdate}|g")
done done
if (${debug}) echo "${red}_blog_idx_for_index: Writing _blog_idx_for_index to file: ${project_dir}/blog/index.tmp.html${end}" if (${debug}) echo "${red}_blog_idx_for_index: Writing _blog_idx_for_index to file: ${project_dir}/blog/index.tmp.html${end}"
if (${debug}) echo "${red}_blog_idx_for_index: blog_list_content = ${blog_list_content}${end}" if (${debug}) echo "${red}_blog_idx_for_index: blog_list_content = ${blog_list_content}${end}"
echo ${blog_list_content} >> ${project_dir}/blog/index.tmp.html echo ${blog_list_content} >> ${project_dir}/blog/index.tmp.html
done done
} }