Sitemap not working properly

Missing condition for unpublised document
Remove unpublished document
Refactoring