eastern-color/sitemap-bundle

This Symfony bundle provide another way to manage your sitemap.

1.0.2 2018-03-05 07:27 UTC

This package is auto-updated.

Last update: 2024-03-29 03:38:29 UTC


README

This Symfony bundle provide another way to manage your sitemap.

Installation

  1. composer require eastern-color/sitemap-bundle
  2. Enable bundle in symfony's /app/AppKernel.php
    • new EasternColor\SitemapBundle\EasternColorSitemapBundle(),

Prerequisites

  • You MUST set "framework.templating" in Symfony's config.yml

TODO

  • Remove services dependency on container
  • Extends this README

Command

  1. ec:sitemap:generate
    • option: --gzip

Basic Usage (route option)

  1. Simply add option sitemap to any route.
    • xml: <option key="sitemap">true</option>
  • You may provide a list of locales using Symfony parameters, naming it locales
    • e.g.: locales: ['en', 'zh']

Advanced Usage (custom service provider)

  1. Create symfony service provider
namespace AppBundle;

use EasternColor\SitemapBundle\Services\SitemapXmlGeneratorProvider\SitemapXmlGeneratorProviderBase;

class MySitemapXmlGeneratorProvider extends SitemapXmlGeneratorProviderBase
{
}

License

This bundle is under the MIT license.