The KunstmaanSitemapBundle adds a sitemap to your website. it will generate a sitemap recursively from all the children of the top nodes.
composer.json
"require": {
"kunstmaan/sitemap-bundle": "*"
},
AppKernel.php:
public function registerBundles()
{
$bundles = array(
// ...
new Kunstmaan\SitemapBundle\KunstmaanSitemapBundle(),
// ...
);
routing.yml
# KunstmaanSitemapBundle
KunstmaanSitemapBundle:
resource: "@KunstmaanSitemapBundle/Resources/config/routing.yml"
prefix: /{_locale}/
requirements:
_locale: "%requiredlocales%"
Once installed, you will be able to view the generated sitemap XML on the '/en/sitemap.xml' route.
The bundle comes with a generated XML and its own sitemap page you can add to your website, for more information, check our the more detailed documentation.