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

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

dek-cz/meta-canonical-control
=============================

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

1.6.2(4y ago)07.2k↓50%BSD-3-ClausePHPPHP &gt;=7.4.0

Since Sep 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dek-cz/meta-canonical-control)[ Packagist](https://packagist.org/packages/dek-cz/meta-canonical-control)[ RSS](/packages/dek-cz-meta-canonical-control/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (17)Used By (0)

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

[](#meta-control)

[![Build Status](https://github.com/dek-cz/meta-canonical-control/workflows/CI/badge.svg)](https://github.com/dek-cz/meta-canonical-control/actions?query=workflow%3ACI+branch%3Amaster)[![Downloads this Month](https://camo.githubusercontent.com/4eec6e93ca2d58c72bc4b5bf08a303d99d23bb62cf842d39334605a8d527c410/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f64656b2d637a2f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2e737667)](https://packagist.org/packages/dek-cz/meta-canonical-control)[![Latest stable](https://camo.githubusercontent.com/e245e9a4a7ac801bba37a5574af7b38e71b39aa6dd1d4f5cf4bab04d1a771161/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656b2d637a2f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2e737667)](https://packagist.org/packages/dek-cz/meta-canonical-control)[![Coverage Status](https://camo.githubusercontent.com/c15cc9a928db5502622be59b313e33868602916577868c04ab90111b83d765e5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64656b2d637a2f6d6574612d63616e6f6e6963616c2d636f6e74726f6c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/dek-cz/meta-canonical-control?branch=master)

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

[](#installation)

Via Composer:

```
$ composer require dek-cz/meta-canonical-control
```

Usage
-----

[](#usage)

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

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

Use the control factory in your presenter:

```
protected function createComponentMeta(): Dekcz\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

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 67% 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 ~112 days

Recently: every ~105 days

Total

16

Last Release

1470d 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/8ed8fb273071533a2b9043191eb39185c13d5fafa84a6ac09fb891c422f496c2?d=identicon)[dek-cz](/maintainers/dek-cz)

---

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 (20 commits)")[![janzarubadek](https://avatars.githubusercontent.com/u/79913795?v=4)](https://github.com/janzarubadek "janzarubadek (11 commits)")[![dek-webmaster](https://avatars.githubusercontent.com/u/79909085?v=4)](https://github.com/dek-webmaster "dek-webmaster (2 commits)")

---

Tags

netteheadercomponentseometacanonical

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/dek-cz-meta-canonical-control/health.svg)](https://phpackages.com/packages/dek-cz-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)
