PHPackages                             danmurf/metatag - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. danmurf/metatag

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danmurf/metatag
===============

An html head meta tag generator.

2.0.0(8y ago)2156MITPHPPHP &gt;=7.1CI failing

Since Nov 16Pushed 5y ago2 watchersCompare

[ Source](https://github.com/danmurf/MetaTag)[ Packagist](https://packagist.org/packages/danmurf/metatag)[ RSS](/packages/danmurf-metatag/feed)WikiDiscussions master Synced 4w ago

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

MetaTag
=======

[](#metatag)

[![Build Status](https://camo.githubusercontent.com/214beb10046616457dd86cba3263528c9eaedf8d2296b0083dfe80b7c14ccac1/68747470733a2f2f7472617669732d63692e6f72672f64616e6d7572662f4d6574615461672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/danmurf/MetaTag)

A library for aggregating and generating html head meta tags. Great for MVC apps; include your meta tags in your controllers and output the result in your views.

To get started, install the library with composer:

`composer require danmurf/metatag`

Start up the library:

```
use danmurf\MetaTag;

class MyController
{
  public function index()
  {
    $metatag = new MetaTag();
    //...
  }
}
```

Add page keywords:

```
$metatag->setKeywords(['awesome', 'weblog', 'writings']);
```

Add a page description:

```
$metatag->setDescription("This weblog is about...");
```

Add an author tag:

```
$metatag->setAuthor("Jessie Wongus");
```

Set the page's canonical URL

```
$metatag->setCanonicalUrl("https://www.example.com/splendid");
```

If you'd rather hide the page from search engines:

```
$metatag->setNoindex(true);
```

Then add the output to your view / template to render the meta tags:

```
$metatag->render();
```

Final output:

```

```

If you like to keep your output tidy, add an indent of 4 spaces to your meta tags:

```
$metatag->render(4);
```

License
-------

[](#license)

The MetaTag library is released under the [MIT license](https://opensource.org/licenses/MIT).

Contributions
-------------

[](#contributions)

Any contributions or suggestions welcome. Please submit pull requests to the 'develop' branch.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94% 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 ~80 days

Recently: every ~119 days

Total

7

Last Release

3031d ago

Major Versions

1.0.5 → 2.0.02018-03-12

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4

2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/308e6c9ffddf70c40bbaec93b1c240bd65fcdf35b16a1dac4732f0e86d00f4b3?d=identicon)[danmurf](/maintainers/danmurf)

---

Top Contributors

[![danmurf](https://avatars.githubusercontent.com/u/639396?v=4)](https://github.com/danmurf "danmurf (47 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/danmurf-metatag/health.svg)

```
[![Health](https://phpackages.com/badges/danmurf-metatag/health.svg)](https://phpackages.com/packages/danmurf-metatag)
```

###  Alternatives

[sun/country

Sun Country is the package that helps you to get the country name &amp; dialing code by the country ISO 3166-1 Alpha-2 code.

1016.8k](/packages/sun-country)

PHPackages © 2026

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