l91/seo-bundle

基于 Symfony 的网站爬虫 SEO 扩展包

dev-master 2017-07-31 22:08 UTC

This package is auto-updated.

Last update: 2024-09-21 21:12:06 UTC


README

基于 Symfony 的网站爬虫 SEO 扩展包。

安装

使用 composer 安装依赖

composer require l91/seo-bundle:dev-master

将其添加到您的 Kernel 中

new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new L91\Bundle\SeoBundle\L91SeoBundle(),

添加新路由

l91_seo:
    resource: '@L91SeoBundle/Resources/config/routing.xml'
    prefix: /crawler

Gedmo Tree 扩展配置

doctrine:
    orm:
        mappings:
            gedmo_tree:
                type: xml
                prefix: Gedmo\Tree\Entity
                dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity"
                alias: GedmoTree
                is_bundle: false

stof_doctrine_extensions:
    orm:
        default:
          tree: true

创建数据库模式

bin/console doctrine:schema:update

用法

bin/console l91:seo:crawl http://www.example.org