From 6b0644442e524c5b9f0c773a9110126ae45110aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Mon, 29 Jan 2024 23:45:53 +0100 Subject: [PATCH] Rearranged workflow --- qsgen2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qsgen2 b/qsgen2 index 047368a..64222a8 100755 --- a/qsgen2 +++ b/qsgen2 @@ -322,10 +322,6 @@ function _pages() { if (${debug}) echo "_pages: Running engine on ${pages_in_array}" page_content=$( ${engine} ${page_content} ) - # Insert page_content into pages_tpl by replacing the BODY tag present there - if (${debug}) echo "_pages: Replacing BODY with page_content in pages_tpl" - pages_tpl=$( echo ${pages_tpl} | sed -e 's|BODY|${page_content}|g' > /dev/null ) - # Replace every #pagetitle in pages_tpl if (${debug}) echo "_pages: Replacing #pagetitle in pages_tpl" pages_tpl=$( echo ${pages_tpl} | sed -e "s|#pagetitle|${page_title}|g" > /dev/null ) @@ -338,6 +334,10 @@ function _pages() { if (${debug}) echo "_pages: _last_updated in pages_tpl" pages_tpl=$( _last_updated ${pages_tpl} ) + # Insert page_content into pages_tpl by replacing the BODY tag present there + if (${debug}) echo "_pages: Replacing BODY with page_content in pages_tpl" + pages_tpl=$( echo ${pages_tpl} | sed -e "s|BODY|${page_content}|g" > /dev/null ) + # Run a cleanup if in case something was left out _cleanup ${pages_tpl}