Download the PHP package jantaodev/sitemap-bundle without Composer

On this page you can find all versions of the php package jantaodev/sitemap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sitemap-bundle

JantaoDevSitemapBundle

This Symfony bundle provides sitemap XML generation.

Features:

Requirements:

1. Installation

Run composer require jantaodev/sitemap-bundle.

Register the bundle in the app/AppKernel.php file (optional):

Add host name in app/config/parameters.yml

or in app/config/config.yml

Now you can use the bundle.

2. Basic usage

There are several ways to add route to sitemap.

2.1. Annotation, yaml, XML (for static routes without parameters)

Annotation simple example:

Yaml simple example:

XML simple example:

Annotation full example:

Yaml full example:

XML full example:

There are three parameters:

It`s not necessary to specify all parameters.

2.2. Bundle configuration in app/config/config.yml

Simple example for static route:

Full example for static route:

Full example for dynamic route with parameters:

Iterate data for route parameters with array iterator:

Iterate data for route parameters with array iterator (example 2):

Iterate data for route parameters with Doctrine iterator:

3. Execute sitemap generation

There are two ways to execute sitemap generation:

1) via console

2) via service

4. Advanced configuration

Full bundle configuration:

Parameters description:

Parameter Description
hosts For one host configuration see chapter 1, For several hosts see chapter 4.2
gzip Enable sitemap GZip compression
scheme Host scheme mode (http, https, https_only*)
robots See chapter 4.1
sitemap See chapters 2.2 and 4.2

4.1. Robots.txt configuration

Full robots.txt configuration:

Parameters description:

Parameter Description
allow Allow entries array, key is a path, value is a user-agent (null means "*")
disallow Disallow entries array
crawl_delay Crawl delay parameter
clean_param Clean param entries array, key is a path, value is an array of parameters

For more details about robots.txt parameters see this or this.

4.2. Several hosts support

Several hosts support allows you to generate different sitemaps to several hosts.

So, enable several hosts support, list your hosts in bundle configuration:

Enable robots.txt switching controller in router (add following lines to app/config/routing.yml):

By default all ruotes will be added to each host sitemaps.

But in sitemap section in bundle configuration you can specify host.

Example:

In this example homepage will be added to all sitemaps, but about page will be add only to "foo.com" sitemap.

Example 2 (different slugs):

5. Add custom event listener

To add a URL using your own logic, you can use event listener or event subscriber.

Example AppBundle/EventListener/SomeListener.php:

Example AppBundle/Resources/config/services.yml:

6. Notes

TODO:

7. License

This bundle is under MIT license


All versions of sitemap-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
symfony/framework-bundle Version ^5.0
symfony/yaml Version *
doctrine/orm Version ^2.7
doctrine/doctrine-bundle Version ^2.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jantaodev/sitemap-bundle contains the following files

Loading the files please wait ....