PHPackages                             ayrel/seo-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. ayrel/seo-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

ayrel/seo-bundle
================

Symfony SEO bundle : create title and meta html tag with the request attributes

23381PHP

Since Jan 27Pushed 9y ago4 watchersCompare

[ Source](https://github.com/laurentosp/AyrelSeoBundle)[ Packagist](https://packagist.org/packages/ayrel/seo-bundle)[ RSS](/packages/ayrel-seo-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

AyrelSeoBundle
==============

[](#ayrelseobundle)

With this bundle you can configure html meta tag and title tag in a config file : /app/config/seo.yml or just by adding an seo annotation.

You can write meta tags with Twig patterns. The available variables are those in the Request attributes.

[![SensioLabsInsight](https://camo.githubusercontent.com/b1b120f8e38650f3815321b6236d804136a3192ce67766e1458d8fcb95402074/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30306239343464312d643139372d343261652d383331392d3237626363656265363030362f6d696e692e706e67)](https://insight.sensiolabs.com/projects/00b944d1-d197-42ae-8319-27bccebe6006) [![Build Status](https://camo.githubusercontent.com/1c537002ef14f7d467ce92e20c7186faf839ac7ad1ee8ce7ceaac9e154563498/68747470733a2f2f7472617669732d63692e6f72672f6c617572656e746f73702f417972656c53656f42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/laurentosp/AyrelSeoBundle) [![Coverage Status](https://camo.githubusercontent.com/026e051c2df76e7defb39cb123d20eac57bc8b97720b95cff91cac8fb7101b2d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c617572656e746f73702f417972656c53656f42756e646c652f62616467652e737667)](https://coveralls.io/github/laurentosp/AyrelSeoBundle)

Install
-------

[](#install)

\###Step 1 : Download

use composer...

```
composer require ayrel/seo-bundle dev-master
```

\###Step 2 : Enable The Bundle add the Bundle to your application kernel

```
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Ayrel\SeoBundle\AyrelSeoBundle(),
        // ...
    );
}
```

it's done... you can enjoy!!!

Configure Your first Route
--------------------------

[](#configure-your-first-route)

```
use Ayrel\SeoBundle\Annotation\SeoAnnotation as Seo;

class DefaultController extends Controller
{
    /**
     * @Route("/", name="homepage")
     * @Seo({
     *     "title": "my Website | {{_route}}",
     *     "description": "this is the route {{_route}} of my website"
     * })
     */
    public function indexAction(Request $request)
    {
        // replace this example code with whatever you need
        return $this->render('default/index.html.twig', [
            'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
        ]);
    }

    /*....*/
}
```

Use with The ParamConverter Component
-------------------------------------

[](#use-with-the-paramconverter-component)

The ParamConverter Component register the params attributes of your Controller in the Request attributes.

With this Bundle you can access these Object to write amazing templates.

```
use Ayrel\SeoBundle\Annotation\SeoAnnotation as Seo;

use AppBundle\Entity\Product;

class DefaultController extends Controller
{
    /**
     * @Route("/product/{id}", name="product")
     * @Seo({
     *     "title": "{{product.title}} : {{product.price}} €",
     *     "description": "{{product.desc}}"
     * })
     */
    public function productAction(Product $product)
    {
        /*.....*/
    }

    /*....*/
}
```

Configure all your routes in one file
-------------------------------------

[](#configure-all-your-routes-in-one-file)

You can set your metaTag Templates by annotation. But you can also write a yml file to configure all you routes.

Just create a app/config/seo.yml file

and configure your templates :

```
homepage:
    title: 'my beautifull title'
    description: 'this is a description'
    og_title: 'you can share this'
    og_description: 'this is a so interesting webpage....'

product:
    title: '{{product.title}} : {{product.price}} €'
    description: '{{product.desc}}'
```

Configure default meta
----------------------

[](#configure-default-meta)

you can add default value to the meta.

Just write you're app/config/config.yml file

```
ayrel_seo:
    default:
        title: 'my webisite | {_route}'
```

if you want to use the default meta value, configure the route meta with a NULL value.

```
homepage:
    title: ~
```

\##Resources [Twig Strategy](Resources/doc/twig_render_strategy.md)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff5f6f8ccb79af6da6c1f312607a45c8803e76fdfe849f0a76a8f66c7d3dd365?d=identicon)[ayrel](/maintainers/ayrel)

---

Top Contributors

[![laurentosp](https://avatars.githubusercontent.com/u/10371534?v=4)](https://github.com/laurentosp "laurentosp (34 commits)")[![Ayrel](https://avatars.githubusercontent.com/u/1415665?v=4)](https://github.com/Ayrel "Ayrel (3 commits)")

### Embed Badge

![Health badge](/badges/ayrel-seo-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ayrel-seo-bundle/health.svg)](https://phpackages.com/packages/ayrel-seo-bundle)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
