From e4bd04d6dc5026388b4477c88209eb1c00c630a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Tue, 30 Jan 2024 14:48:25 +0100 Subject: [PATCH] Working on _blog_idx_for_index --- qsgen2 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/qsgen2 b/qsgen2 index da5ba85..91a48d0 100755 --- a/qsgen2 +++ b/qsgen2 @@ -519,13 +519,11 @@ function _blogs() { # Now BLOG_META_STR_ARRAY contains the metadata string for each blog post export BLOG_META_STR_ARRAY - export updated_blogs=true fi else echo "${yellow}No new or updated Blogs detected.${end}" - export updated_blogs=false fi } @@ -537,8 +535,6 @@ function _blog_idx_for_index() { local debug=true -#if [[ ${updated_blogs} = "true" ]]; then - local blog_list_tpl=$(<${project_dir}/templates/${theme}/blog_list.tpl) # Truncate file before writing new one @@ -579,7 +575,6 @@ function _blog_idx_for_index() { 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 done -#fi } @@ -598,11 +593,10 @@ function _blog_index() { _blogs get_index - if [[ ${updated_blogs} == "true" ]]; then echo "${green}Updating the Blog Index file${end}" blog_index_content=$(echo "${blog_index}" | perl -pe "s|BODY|${blog_index_list}|g") echo ${blog_index_content} > ${www_root}/blog/index.html - fi + } @@ -785,6 +779,6 @@ _blogs echo "Running _blog_idx_for_index" _blog_idx_for_index #echo "${green}Running function _blog_index" -#_blog_index +_blog_index echo "${green}Running function _pages${end}" _pages \ No newline at end of file