ibrows / simple-seo-bundle
一个用于添加SEO功能的Symfony2 Bundle
1.9.2
2015-11-05 14:57 UTC
Requires
- php: >=5.3.3
- symfony/framework-bundle: !=2.3.9,~2.2
Suggests
- ibrows/simplecms-bundle: ~5.0
This package is auto-updated.
Last update: 2024-09-15 19:32:33 UTC
README
IbrowsSimpleSeoBundle 支持为每个路由添加额外的路径要求,并支持向任何路径添加任何meta标签
安装和设置Bundle
-
获取源代码
$ php composer.phar require ibrows/simple-seo-bundle
Composer会将Bundle安装到您的项目目录
ibrows/simple-seo-bundle
中。 -
将Bundle添加到您的
AppKernel
类中// app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new Ibrows\SimpleSeoBundle\IbrowsSimpleSeoBundle(), // ... ); // ... }
-
添加路由
// app/config/routing.yml SimpleSeoBundle: resource: . type: ibrows_router prefix: /
-
生成Schema
php app/console doctrine:schema:update --force
最小配置
此Bundle不需要任何配置!
附加配置
编辑默认配置
ibrows_simple_seo:
entity_class: Ibrows\SimpleSeoBundle\Entity\MetaTagContent
localized_alias: true
add_query_string: false
admin:
allow_create: true
alias:
maxLength: 100
separatorUnique: '-'
separator: /
notAllowedCharsPattern: '![^-a-z0-9_\/]+!'
sortOrder: { }