octave / sitemap-bundle
Symfony sitemap generator
Installs: 16 708
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0.1
- symfony/framework-bundle: ^2.8 || ^3.0 || ^4.0 || ^5.0
- symfony/templating: ^2.8 || ^3.0 || ^4.0 || ^5.0
- symfony/twig-bundle: ^2.8 || ^3.0 || ^4.0 || ^5.0
- twig/twig: ^1.28 || ^2.0 || ^3.0
README
Installation
Step 1: Download OctaveSitemapBundle using composer
Require the bundle
"require": { ... some repositories "octave/sitemap-bundle": "^1.0.0" }
And run composer update
.
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Octave\SitemapBundle\OctaveSitemapBundle(), // ... ); }
Step 3: Implement your sitemap source
<?php namespace AppBundle\Service; use Octave\SitemapBundle\Service\SourceInterface; use Octave\SitemapBundle\Model\Item; class AppSitemapSource implements SourceInterface { public function getItems() { return [ new Item('http://mysite.com/', new \DateTime(), Item::FREQ_ALWAYS, 1.0) ]; } }
Step 4: Configure source service
# app/config/services.yml services: app.sitemap.source: class: AppBundle\Service\AppSitemapSource tags: - { name: 'octave.sitemap.source' }