code: protected function generateSiteMap()
      {
          $urls = array();
          $siteName = $this->configurationHandler->siteName();
          foreach ($this->pagesCollectionParser->pages() as $page) {
              foreach($page["seo"] as $seo) {
                  $urls[] = array(
                      'href' => $siteName . '/' . $seo["permalink"],
                      'frequency' => $seo["sitemap_frequency"],
                      'priority' => $seo["sitemap_priority"],
                  );
              }
          }
  
          return $this->twig->render('RedKiteCms/Resources/views/Sitemap/sitemap.html.twig', array('urls' => $urls));
      }
docs: Generated the site map
  
  @param  string $websiteUrl
  @return string