From 804988108ad7d80c33cf873b88ee7e9bde9a8291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Tue, 30 Jan 2024 10:41:17 +0100 Subject: [PATCH] More debug info in _blogs --- qsgen2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qsgen2 b/qsgen2 index 7e1b970..4d2ff2b 100755 --- a/qsgen2 +++ b/qsgen2 @@ -406,7 +406,6 @@ function _blogs() { _blog_cache if (( ${#make_blog_array[@]} > 0 )); then - local blog_tpl=$(<"${project_dir}/templates/${theme}/blogs.tpl") for blog in "${make_blog_array[@]}"; do if (${debug}) echo "_blogs: Processing ${blog}" @@ -433,6 +432,8 @@ function _blogs() { # Regular blog creation process if [[ ! ${mode} ]]; then + local blog_tpl=$(<"${project_dir}/templates/${theme}/blogs.tpl") + for blog in "${make_blog_array[@]}"; do if (${debug}) echo "_blogs: Processing ${blog}" @@ -455,9 +456,11 @@ function _blogs() { blog_content="$(_last_updated "${blog_content}")" # Create directory if it doesn't exist + if (${debug}) echo "_blogs: Creating ${blog_dir}" [[ ! -d "${www_root}${blog_dir}" ]] && mkdir -p "${www_root}${blog_dir}" # Write to file + if (${debug}) echo "_blogs: Writing ${blog} to disk: ${www_root}${blog_url}" echo "${blog_content}" > "${www_root}${blog_url}" done