PHPackages                             ianm/html-head - 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. ianm/html-head

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

ianm/html-head
==============

Add custom items to the HTML &lt;head&gt; attributes

1.2.4(1y ago)325.1k↑28.6%2[2 issues](https://github.com/imorland/html-head/issues)MITTypeScriptCI passing

Since Jan 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/imorland/html-head)[ Packagist](https://packagist.org/packages/ianm/html-head)[ Fund](https://www.buymeacoffee.com/ianm1)[ RSS](/packages/ianm-html-head/feed)WikiDiscussions 2.x Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (17)Used By (0)

HTML Head Items
===============

[](#html-head-items)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/2cd107667deec8249cd27d2085078ba22ab143e18edba3a23e4bea2d6397a74b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69616e6d2f68746d6c2d686561642e737667)](https://packagist.org/packages/ianm/html-head)

A [Flarum](http://flarum.org) extension that gives forum administrators full control over custom tags injected into the HTML of their forum — without touching code or config files.

Features
--------

[](#features)

- **Structured tag types** — dedicated forms for ``, ``, ``, ``, and raw HTML, with type-aware fields and validation for each
- **Inject into head or body** — choose per item whether it is injected into `` or before ``
- **Target forum, admin, or both** — each item can be scoped to the forum frontend, the admin panel, or both
- **Automatic preconnect hints** — `` and `` hints are automatically generated for any cross-origin `` or `` tags, warming the connection before the browser needs it
- **Save-time rendering** — HTML is rendered and cached when you save, not on every page request; no database queries on the hot path
- **Live preview** — the modal shows a real-time preview of the exact HTML tag that will be injected as you fill in the fields
- **Sort order** — drag items into the order you need them injected
- **Clean admin UI** — searchable table with colour-coded type, location and page badges; icon buttons for edit and delete

Tag types
---------

[](#tag-types)

TypeWhat it does**Meta**Standard `name`/`content` or Open Graph `property`/`content` meta tags**Link**`` tags with guided fields for `rel`, `href`, `as`, `fetchpriority`, `crossorigin`, and any additional attributes (e.g. `sizes`, `hreflang`, `media`)**Script**External `` with `defer`/`async`/`module`/`crossorigin` options, or inline `` blocks**Style**Inline `` blocks**Raw HTML**Freeform HTML for anything that doesn't fit the abovePerformance
-----------

[](#performance)

Items are rendered to HTML at save time and stored in two cache keys (one per injection location). On page load, `AddHeaders` reads from cache only — no database queries, no per-request rendering. When an item is created, updated, or deleted, only the affected cache keys are invalidated and synchronously rebuilt.

Cross-origin `` and `` tags automatically get preconnect and dns-prefetch hints prepended, reducing connection setup latency for external resources.

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

[](#installation)

```
composer require ianm/html-head:"*"
php flarum migrate
php flarum assets:publish
```

Updating
--------

[](#updating)

```
composer update ianm/html-head
php flarum migrate
php flarum cache:clear
```

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/ianm/html-head)
- [GitHub](https://github.com/imorland/html-head)
- [Discuss](https://discuss.flarum.org/d/25907)

Support
-------

[](#support)

Please consider supporting my extension development and maintenance work.

[![Buy Me A Coffee](https://camo.githubusercontent.com/9a769e616ce78645bf51d12e4179cfbfd72fb413722b284e0be3ec3c75a86010/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f64656661756c742d6f72616e67652e706e67)](https://www.buymeacoffee.com/ianm1)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance48

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 65% 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 ~128 days

Recently: every ~155 days

Total

16

Last Release

82d ago

Major Versions

0.2.0 → 1.0.02021-05-20

1.x-dev → 2.0.0-beta.12025-11-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

---

Top Contributors

[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (26 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (12 commits)")[![DavideIadeluca](https://avatars.githubusercontent.com/u/146922689?v=4)](https://github.com/DavideIadeluca "DavideIadeluca (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

htmlheadersflarumcustomhead

### Embed Badge

![Health badge](/badges/ianm-html-head/health.svg)

```
[![Health](https://phpackages.com/badges/ianm-html-head/health.svg)](https://phpackages.com/packages/ianm-html-head)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k13](/packages/fof-byobu)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k4](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/gamification

Upvotes and downvotes for your Flarum community

4066.1k8](/packages/fof-gamification)[fof/best-answer

Mark a post as the best answer in a discussion

25154.0k20](/packages/fof-best-answer)

PHPackages © 2026

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