From f6b0f2e7cfddf23ac69a5de43c05654ab7cdd990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Fri, 2 Feb 2024 10:35:33 +0100 Subject: [PATCH] _pages: look for file_ex and run engine --- qsgen2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qsgen2 b/qsgen2 index 5d8fb1a..7e07e4e 100755 --- a/qsgen2 +++ b/qsgen2 @@ -415,7 +415,11 @@ function _pages() { # HTML'ify the page content if (${debug}) _msg debug "_pages: Running engine on ${pages_in_array}" - local page_content=$( ${engine} "$page_content" ) + if [[ ${file_ext} == "tpl" ]]; then + local page_content=$( ${engine} "$page_content" ) + elif [[ ${file_ext} == "md" ]]; then + local page_content=$( echo "$page_content" | ${engine} >&1 ) + fi # Look for links, images and videos and convert them if present. if (${debug}) _msg debug "_pages: Checking for #link, #showimg and #ytvideo in page_content"