Reordering and refactoring
This commit is contained in:
parent
31c5e2f20f
commit
13d8753c61
31
qsgen2
31
qsgen2
@ -556,10 +556,6 @@ function _blogs() {
|
|||||||
if (${debug}) _msg debug "_blogs: Replacing tagline, sitename and pagetitle"
|
if (${debug}) _msg debug "_blogs: Replacing tagline, sitename and pagetitle"
|
||||||
blog_content=$( echo ${blog_content} | perl -pe "s|#tagline|${site_tagline}|gs; s|#sitename|${site_name}|gs; s|#pagetitle|${page_title}|gs" )
|
blog_content=$( echo ${blog_content} | perl -pe "s|#tagline|${site_tagline}|gs; s|#sitename|${site_name}|gs; s|#pagetitle|${page_title}|gs" )
|
||||||
|
|
||||||
# Replace every #sitename in blog_content
|
|
||||||
#if (${debug}) _msg debug "_blogs: Replacing sitename"
|
|
||||||
#local blog_content=$( echo ${blog_content} | perl -pe "s|#sitename|${site_name}|gs" )
|
|
||||||
|
|
||||||
blog_content=$(_last_updated "${blog_content}")
|
blog_content=$(_last_updated "${blog_content}")
|
||||||
blog_content=$(_cleanup "${blog_content}")
|
blog_content=$(_cleanup "${blog_content}")
|
||||||
|
|
||||||
@ -582,6 +578,7 @@ function _blogs() {
|
|||||||
_msg sub "- No new or updated Blogs found"
|
_msg sub "- No new or updated Blogs found"
|
||||||
export new_updated_blogs=false
|
export new_updated_blogs=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_blog_idx_for_index
|
_blog_idx_for_index
|
||||||
_blog_index
|
_blog_index
|
||||||
|
|
||||||
@ -625,19 +622,23 @@ function _blog_idx_for_index() {
|
|||||||
|
|
||||||
local adate=( $( echo ${sdate} ) )
|
local adate=( $( echo ${sdate} ) )
|
||||||
local caladay="${adate[1]}"
|
local caladay="${adate[1]}"
|
||||||
local calnday="${adate[4]}"
|
|
||||||
local calmonth="${adate[3]}"
|
|
||||||
local calyear="${adate[2]}"
|
local calyear="${adate[2]}"
|
||||||
|
local calmonth="${adate[3]}"
|
||||||
|
local calnday="${adate[4]}"
|
||||||
|
|
||||||
local bdate="${adate[1]} - ${adate[4]}/${adate[3]}/${adate[2]}"
|
local bdate="${adate[1]} - ${adate[4]}/${adate[3]}/${adate[2]}"
|
||||||
blog_list_content=$(echo "${blog_list_tpl}" | perl -pe "s|BLOGURL|${url}|g")
|
blog_list_content=$(
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|BLOGTITLE|${btitle}|g")
|
echo "${blog_list_tpl}" | \
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|INGRESS|${ingress}|g")
|
perl -pe "\
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|BLOGDATE|${bdate}|g")
|
s|BLOGURL|${url}|g; \
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|CALADAY|${caladay}|g")
|
s|BLOGTITLE|${btitle}|g; \
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|CALNDAY|${calnday}|g")
|
s|INGRESS|${ingress}|g; \
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|CALMONTH|${calmonth}|g")
|
s|BLOGDATE|${bdate}|g; \
|
||||||
blog_list_content=$(echo "${blog_list_content}" | perl -pe "s|CALYEAR|${calyear}|g")
|
s|CALADAY|${caladay}|g; \
|
||||||
|
s|CALNDAY|${calnday}|g; \
|
||||||
|
s|CALMONTH|${calmonth}|g; \
|
||||||
|
s|CALYEAR|${calyear}|g \
|
||||||
|
")
|
||||||
|
|
||||||
done
|
done
|
||||||
unset sdate btitle ingress url
|
unset sdate btitle ingress url
|
||||||
@ -981,6 +982,6 @@ function _zhtml() {
|
|||||||
|
|
||||||
# Time to run the first function
|
# Time to run the first function
|
||||||
_blogs
|
_blogs
|
||||||
_add_blog_list_to_index
|
# _add_blog_list_to_index
|
||||||
_pages
|
_pages
|
||||||
_sitemap
|
_sitemap
|
Loading…
Reference in New Issue
Block a user