_pages: Add variable new_updated_pages=true/false and use it in _sitemap
This commit is contained in:
		
							
								
								
									
										6
									
								
								qsgen2
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								qsgen2
									
									
									
									
									
								
							@@ -423,9 +423,12 @@ function _pages() {
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
      done
 | 
					      done
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
 | 
					      export new_updated_pages=true
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        _msg info "No new or updated Pages"
 | 
					        _msg info "No new or updated Pages"
 | 
				
			||||||
 | 
					        export new_updated_pages=false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -621,7 +624,8 @@ function _blog_index() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function _sitemap() {
 | 
					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"
 | 
					    _msg info "Generating sitemap.xml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user