octave/sitemap-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-22