octave/sitemap-bundle
最新稳定版本:2.1.0
Composer 安装命令:
composer require octave/sitemap-bundle
包简介
Symfony sitemap generator
关键字:
README 文档
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' }
统计信息
- 总下载量: 24.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-22