You may want to change the UrlConcrete default values:
# config/packages/presta_sitemap.yaml
presta_sitemap:
defaults:
priority: 1
changefreq: daily
lastmod: nowYou may want to change the default 3600 seconds max-age set when rendering the
sitemap. Edit the following configuration in your application.
# config/packages/presta_sitemap.yaml
presta_sitemap:
timetolive: 3600Also this value is used by the cache if you have installed and configured doctrine_cache.
If you are going to use sitemap Dumper to create sitemap files by using CLI command you have to set the base URL of where you sitemap files will be accessible. The hostname of the URL will also be used to make Router generate URLs with hostname.
# config/services.yaml
parameters:
router.request_context.host: your-domain.com
router.request_context.scheme: httpNote: You may noticed that there is nothing specific to this bundle. In fact, doing this you just allowed your whole application to generate URLs from the command line. Please have a look to Symfony's official documentation for more information.
The listener that provides annotation support is enabled by default. To disable it, add the following configuration to your application.
# config/packages/presta_sitemap.yaml
presta_sitemap:
route_annotation_listener: falseYou can change the default maximum number of items generated for each sitemap with the following configuration. It cannot break the maximum limit of 50,000 items and maximum size of 1,000,000 bytes. The default value is 50,000.
# config/packages/presta_sitemap.yaml
presta_sitemap:
items_by_set: 50000Sitemap can be stored in a cache.
PrestaSitemapBundle uses DoctrineCacheBundle to cache things.
You need to install the bundle and specify what kind of cache system to use with this bundle.
- Follow the instruction to install DoctrineCacheBundle.
- Configure a provider for this bundle.
For example:
# config/packages/doctrine_cache.yaml
doctrine_cache:
providers:
presta_sitemap:
type: array
namespace: presta_sitemapBoth sitemap generator and sitemap dumper services can be changed within the configuration.
# config/packages/presta_sitemap.yaml
presta_sitemap:
generator: presta_sitemap.generator_default
dumper: presta_sitemap.dumper_default