From 45137cc87314268220cb30baf586b86a91a271da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Sat, 3 Feb 2024 18:52:42 +0100 Subject: [PATCH] _pages: Hmm, I wonder if this'll work --- qsgen2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qsgen2 b/qsgen2 index 85aa64e..8b1dd66 100755 --- a/qsgen2 +++ b/qsgen2 @@ -442,6 +442,17 @@ function _pages() { export new_updated_pages=true else + + # Insert the blog to the front page is blog_in_index is true and the file in the array is index.file_ext + # and if index.tmp.html exist and is not empty + if [[ ${pages_in_array} == "index.${file_ext}" && ${blog_in_index} == "true" && -s "${project_dir}/blog/index.tmp.html" ]]; then + _msg std "Updating index.html with new blog posts" + if (${debug}) _msg sub "- Parsing ${pages_in_array}" + if (${debug}) _msg sub "- blog_in_index = ${blog_in_index}" + if (${debug}) _msg sub "- Listing blog temp file:" + if (${debug}) ls -l ${project_dir}/blog/index.tmp.html + _add_blog_list_to_index + fi _msg sub "- No new or updated Pages found" export new_updated_pages=false