PHPackages                             vrestihnat/meta-canonical-control - 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. vrestihnat/meta-canonical-control

ActiveLibrary[Templating &amp; Views](/categories/templating)

vrestihnat/meta-canonical-control
=================================

Nette control for managing meta data and canonical link in HTML header.

1.4.2(5y ago)0149BSD-3-ClausePHPPHP &gt;=7.4.0

Since Sep 17Pushed 5y agoCompare

[ Source](https://github.com/vrestihnat/meta-canonical-control)[ Packagist](https://packagist.org/packages/vrestihnat/meta-canonical-control)[ RSS](/packages/vrestihnat-meta-canonical-control/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (11)Used By (0)

Meta Control
============

[](#meta-control)

[![Build Status](https://github.com/vrestihnat/meta-canonical-control/workflows/CI/badge.svg)](https://github.com/vrestihnat/meta-canonical-control/actions?query=workflow%3ACI+branch%3Amaster)[![Downloads this Month](https://camo.githubusercontent.com/39c0be44e7162cb6ef1a7b25fcd862d244324abda1e05b586707c2b78fbd43d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f767265737469686e61742f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2e737667)](https://packagist.org/packages/vrestihnat/meta-canonical-control)[![Latest stable](https://camo.githubusercontent.com/af9709ac486cda2f0dec79966847af02aae5864d88d50cab30248d61a90bcbec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f767265737469686e61742f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2e737667)](https://packagist.org/packages/vrestihnat/meta-canonical-control)[![Coverage Status](https://camo.githubusercontent.com/1c47eb04985200be502bc7ac60bed43eb239f3fa52443305fdf5071cdbb44133/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f767265737469686e61742f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/vrestihnat/meta-canonical-control?branch=master)

Installation
------------

[](#installation)

Via Composer:

```
$ composer require vrestihnat/meta-canonical-control
```

Usage
-----

[](#usage)

First register the control factory in your config and optionally set up default metadata:

```
services:
    -
        implement: Vrestihnat\MetaControl\IMetaControlFactory
        setup:
            - setCharset('utf-8')
            - setAuthor('Jon Doe')
```

Use the control factory in your presenter:

```
protected function createComponentMeta(): Vrestihnat\MetaControl\MetaControl
{
    $control = $this->metaControlFactory->create();
    $control->setDescription('Lorem ipsum');
    return $control;
}
```

And render it in your Latte template:

```

    {control meta}

    ...

```

### Overview of supported meta tags

[](#overview-of-supported-meta-tags)

Charset:

```
//
$control->setCharset('utf-8');
$control->getCharset(); // 'utf-8'
```

Document metadata:

```
//
$control->setMetadata('author', 'Jon Doe');
$control->getMetadata('author'); // 'Jon Doe'
```

Document properties:

```
//
$control->setProperty('og:title', 'Foo title');
$control->getProperty('og:title'); // 'Foo title'
```

Pragma directives:

```
//
$control->setPragma('content-type', 'text/html; charset=UTF-8');
$control->getPragma('content-type'); // 'text/html; charset=UTF-8'
```

### Shorthands for standard metadata

[](#shorthands-for-standard-metadata)

Author:

```
//
$control->setAuthor('Jon Doe');
$control->getAuthor(); // 'Jon Doe'
```

Description:

```
//
$control->setDescription('Lorem ipsum');
$control->getDescription(); // 'Lorem ipsum'
```

Keywords:

```
//
$control->setKeywords('foo', 'bar');
$control->addKeyword('baz');
$control->getKeywords(); // ['foo', 'bar', 'baz']
```

Robots:

```
//
$control->setRobots('noindex, nofollow');
$control->getRobots(); // 'noindex, nofollow'
```

### New features

[](#new-features)

Canonical link:

```
//
$control->setCanonical('/test/3');
```

Prev (paging):

```
//
$control->setPrev('/test/3/page/1');
```

Next (paging):

```
//
$control->setNext('/test/3/page/3');
```

Set not unique meta e.g. google-site-verification

```
// \n\n

$control->setMetadata('google-site-verification', '123456789abcdefghijklmnopqrstuvwxyzABCDEFGH');
$control->setMetadata('google-site-verification', 'HGFEDCBAzyxwvutsrqponmlkjihgfedcba987654321');
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 77.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.

###  Release Activity

Cadence

Every ~136 days

Recently: every ~74 days

Total

10

Last Release

1932d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.1.0

v1.1.0PHP &gt;=7.2.0

v1.2.0PHP &gt;=7.4.0

### Community

Maintainers

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

---

Top Contributors

[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (67 commits)")[![vrestihnat](https://avatars.githubusercontent.com/u/10158847?v=4)](https://github.com/vrestihnat "vrestihnat (19 commits)")

---

Tags

netteheadercomponentseometacanonical

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vrestihnat-meta-canonical-control/health.svg)

```
[![Health](https://phpackages.com/badges/vrestihnat-meta-canonical-control/health.svg)](https://phpackages.com/packages/vrestihnat-meta-canonical-control)
```

###  Alternatives

[contributte/forms-bootstrap

Nette extension for Bootstrap forms

211.1M4](/packages/contributte-forms-bootstrap)[dereuromark/cakephp-meta

A CakePHP plugin for SEO meta tags, OpenGraph and Twitter Cards

1012.9k1](/packages/dereuromark-cakephp-meta)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3211.5k](/packages/ycs77-inertia-laravel-ssr-head)[nepada/form-renderer

Latte template based form renderer for Nette forms with full support for Bootstrap 3, 4 &amp; 5.

11251.0k](/packages/nepada-form-renderer)

PHPackages © 2026

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