# Sitemap

## TLDR

Default behavior is set in entity config.

```yaml
auto_admin:
    content:
        contents:
            # [...]
            App\Entity\Article:
                # [...]
                sitemap:
                    # disable: true
                    section: article
                # [...]
# [...]
```

Global config can be used to add routes to one of the sitemaps.

```yaml
auto_admin:
    content:
        sitemap:
            # [...]
            routes:
                default:
                    -   route: 'page_view'
                        param: { slugAdmin: 'news' }
                page:
                    - { name: 'home', param: { myparam: 'myvalue' } }
            # [...]
# [...]
```

Complex configuration can be done using SitemapBuilderInterface (\AutoAdmin\Bundle\Seo\Sitemap\SitemapBuilderInterface)
interface.

---

## Introduction

Permit to describe how entities are retrieved and organized in the site sitemap and sitemap sections.

## Principle

A default SitemapBuilder is handling config-related sitemap entries.
A global config can be used to add routes to one of the sitemaps.
Additional SitemapBuilder can be added in app to add complex structures.

Cache is generated on cache warmup (a cache:clear without options will build cached sitemaps).
Caching is done following domain & language constraints, as /robots.txt is on a root url, we possibly (depending on
language matrix) retrieve all languages for given domain.
