Download the PHP package larapulse/sitemap-bundle without Composer
On this page you can find all versions of the php package larapulse/sitemap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download larapulse/sitemap-bundle
More information about larapulse/sitemap-bundle
Files in larapulse/sitemap-bundle
Package sitemap-bundle
Short Description Provides a way to generate a sitemap as well as for static and dynamic routes, which require Propel, Doctrine, etc.
License MIT
Informations about the package sitemap-bundle
SitemapBundle
This Bundle provides a way to create a xml sitemap using any source you want (Doctrine, Propel, MongoDB, Faker, etc.).
This bundle aims to generate standards compliant sitemaps. For more information about sitemaps go to sitemaps.org.
The sitemap generation part is handled by the SitemapGenerator library, this bundle eases its integration into a Symfony2 application.
Main features
- static sitemap generation
- dynamic sitemap generation
- sitemap index generation
- memory efficient
- datasource independent
- support for media content (currently images and videos)
Install
Via Composer
Register the SitemapBundle
in app/AppKernel.php
:
Configuration
Add the following options to app/config/config.yml
file:
Note:
- The
base_host
will be prepended to relative urls added to the sitemap. - The
base_host_sitemap
will be prepended to the sitemap filename (used for sitemap index) - The
limit
is the number of url allowed in the same sitemap, if defined it will create a sitemap index
Routing
If you don't want to use the console to generate the sitemap, import the routes:
This will make the sitemap available from the /sitemap.xml
URL.
Usage
Add this line /web/sitemap.xml*
to your .gitignore
to prevent tracking sitemap.xml
files by version control system.
Providers
In order to support any kind of datasource, the sitemap uses providers to fetch the data.
Exemple provider:
All the providers implement the ProviderInterface
, which define the
populate()
method.
Note: so they can be automatically used by the sitemap, providers have to be
described in the DIC with the sitemap.provider
tag:
All the services tagged as sitemap.provider
will be used to generate the
sitemap.
Simple provider
A provider to add static routes into the sitemap easily.
Propel provider
A propel provider is included in the bundle. It allows to populate a sitemap with the content of a table.
Here is how you would configure the provider:
Doctrine provider
A doctrine provider is included in the bundle. It allows to populate a sitemap with the content of a table.
Here is how you would configure the provider:
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
- Sergey Podgornyy
- All Contributors
License
The MIT License (MIT). Please see License File for more information. This project was forked from sitemap-php/KPhoenSitemapBundle
All versions of sitemap-bundle with dependencies
symfony/framework-bundle Version ~3.0
symfony/console Version ^3.0
kphoen/sitemap-generator Version ~1.0