From 47939bc7ea6d136a650dcb9cd177201ec4048fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Tue, 30 Jan 2024 00:49:36 +0100 Subject: [PATCH] Debugging --- qsgen2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qsgen2 b/qsgen2 index 8bd7145..64a9138 100755 --- a/qsgen2 +++ b/qsgen2 @@ -338,17 +338,22 @@ function _pages() { pages_tpl=$( echo ${pages_tpl} | sed -e "s|#tagline|${site_tagline}|g" ) # 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 "s|BODY|${page_content}|g" ) + if (${debug}) echo "_pages: Replacing BODY with page_content in pages_tpl" + final_page=$( echo ${pages_tpl} | sed "s|BODY|${page_content}|g" ) # Always use lowercase for file names pages_title_lower=$( _file_to_lower "${pages_in_array}" ) + echo "${final_page}" > ${www_root}/${pages_title_lower%.*}.html + echo "PAGES TEMPLATE" echo ${pages_tpl} echo "#######################################################################################" echo "PAGE CONTENT" echo ${page_content} + echo "#######################################################################################" + echo "FINAL PAGE: ${pages_title_lower%.*}.html" + cat ${www_root}/${pages_title_lower%.*}.html exit