Rearranged workflow

This commit is contained in:
Stig-Ørjan Smelror 2024-01-29 23:45:53 +01:00
parent dc876b71fc
commit 6b0644442e

8
qsgen2
View File

@ -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}