_pages: Add variable new_updated_pages=true/false and use it in _sitemap
This commit is contained in:
parent
794b3285db
commit
816f23db3d
6
qsgen2
6
qsgen2
@ -423,9 +423,12 @@ function _pages() {
|
||||
|
||||
done
|
||||
|
||||
export new_updated_pages=true
|
||||
|
||||
else
|
||||
|
||||
_msg info "No new or updated Pages"
|
||||
export new_updated_pages=false
|
||||
|
||||
fi
|
||||
|
||||
@ -621,7 +624,8 @@ function _blog_index() {
|
||||
|
||||
function _sitemap() {
|
||||
|
||||
if [[ ${sitemap} == "true" ]]; then
|
||||
# Check if sitemap is set to true and if there are updated Blogs or Pages before updating the sitemap.xml file.
|
||||
if [[ ${sitemap} == "true" ]] && ( [[ ${new_updated_blogs} == "true" ]] || [[ ${new_updated_pages} == "true" ]] ); then
|
||||
|
||||
_msg info "Generating sitemap.xml"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user