_pages: Going back to Perl
This commit is contained in:
parent
034a35e24d
commit
3195c5da87
13
qsgen2
13
qsgen2
@ -408,18 +408,17 @@ function _pages() {
|
|||||||
pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") )
|
pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") )
|
||||||
|
|
||||||
# Replace every #pagetitle in pages_tpl
|
# Replace every #pagetitle in pages_tpl
|
||||||
if (${debug}) _msg debug "_pages: Replacing #pagetitle in pages_tpl"
|
if (${debug}) _msg debug "_pages: Replacing #pagetitle, #tagline and #sitename in pages_tpl"
|
||||||
pages_tpl="${pages_tpl//#pagetitle/${page_title}}"
|
pages_tpl=$(echo "${pages_tpl}" | perl -pe "s|#pagetitle|${page_title}|gs; s|#tagline|${site_tagline}|gs; s|#sitename|${site_name}|gs")
|
||||||
#local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#pagetitle|${page_title}|gs" )
|
|
||||||
|
|
||||||
# Replace every #tagline in pages_tpl
|
# Replace every #tagline in pages_tpl
|
||||||
if (${debug}) _msg debug "_pages: Replacing tagline"
|
#if (${debug}) _msg debug "_pages: Replacing tagline"
|
||||||
pages_tpl="${pages_tpl//#tagline/${site_tagline}}"
|
#pages_tpl="${pages_tpl//#tagline/${site_tagline}}"
|
||||||
#local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#tagline|${site_tagline}|gs" )
|
#local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#tagline|${site_tagline}|gs" )
|
||||||
|
|
||||||
# Replace every #sitename in pages_tpl
|
# Replace every #sitename in pages_tpl
|
||||||
if (${debug}) _msg debug "_pages: Replacing sitename"
|
#if (${debug}) _msg debug "_pages: Replacing sitename"
|
||||||
pages_tpl="${pages_tpl//#sitename/${site_name}}"
|
#pages_tpl="${pages_tpl//#sitename/${site_name}}"
|
||||||
#local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#sitename|${site_name}|gs" )
|
#local pages_tpl=$( echo ${pages_tpl} | perl -pe "s|#sitename|${site_name}|gs" )
|
||||||
|
|
||||||
# Replace #updated with today's date and #version with Name and Version to footer
|
# Replace #updated with today's date and #version with Name and Version to footer
|
||||||
|
Loading…
Reference in New Issue
Block a user