Download the PHP package mkebza/sitemap-bundle without Composer
On this page you can find all versions of the php package mkebza/sitemap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mkebza/sitemap-bundle
More information about mkebza/sitemap-bundle
Files in mkebza/sitemap-bundle
Package sitemap-bundle
Short Description Symfony bundle generating sitemaps
License MIT
Informations about the package sitemap-bundle
Sitemap generator bundle for Symfony
Instalation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
Configuration
there is only one available configuration and that is base_url
, its automatically prepended
to all url if they aren't fully quilified.
Usage
Collecting routes works by implementing MKebza\Sitemap\Service\SitemapLocationGeneratorInterface
which is then autoconfigured via symfony container. If you don't use autoconfiguration, you
need to tag your service with mkebza_sitemap.generator
tag to be used.
SitemapLocationGeneratorInterface
Has one method generate()
which is generator and needs to yield object of
MKebza\Sitemap\Service\Location
.
Location
You can either use absolute url or relative URL, which will be prepended by url set in your configuration.
Generating sitemap
From your terminal run bin/console sitemap:generate
, default path is public/sitemap.xml
,
but you can change it by passig path as first argument to the command.
You need to put this command to you cron / scheduler to generate sitemap on regular basis.
All versions of sitemap-bundle with dependencies
symfony/dependency-injection Version ~3.4|~4.0
symfony/event-dispatcher Version ~3.4|~4.0
elao/enum Version ^1.5
symfony/config Version ~3.4|~4.0
symfony/filesystem Version ~3.4|~4.0
symfony/console Version ~3.4|~4.0