PHPackages                             ivovalchev/twig-truncate-html - 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. ivovalchev/twig-truncate-html

ActiveTwig-extension[Templating &amp; Views](/categories/templating)

ivovalchev/twig-truncate-html
=============================

A Twig truncate\_html filter without breaking HTML tags.

1.0.0(6y ago)115.3k↓38.7%[1 issues](https://github.com/I-Valchev/twig-truncate-html/issues)[1 PRs](https://github.com/I-Valchev/twig-truncate-html/pulls)MITPHPPHP &gt;=7.0.0

Since May 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/I-Valchev/twig-truncate-html)[ Packagist](https://packagist.org/packages/ivovalchev/twig-truncate-html)[ RSS](/packages/ivovalchev-twig-truncate-html/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Installation
============

[](#installation)

```
composer require ivovalchev/twig-truncate-html

```

And add it to your `services.yaml`:

```
    app.twig_extension:
        class: IvoValchev\TruncateHtmlExtension\TruncateHtmlExtension
        tags:
            - { name: twig.extension }

```

How to use
==========

[](#how-to-use)

```
{{ "hello world"|truncate_html(5) }}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78ae1389d35ad7a4cda25bce02c73b64994823df39bc8bd023eea17dd4a54dc9?d=identicon)[I-Valchev](/maintainers/I-Valchev)

---

Top Contributors

[![I-Valchev](https://avatars.githubusercontent.com/u/7093518?v=4)](https://github.com/I-Valchev "I-Valchev (4 commits)")

### Embed Badge

![Health badge](/badges/ivovalchev-twig-truncate-html/health.svg)

```
[![Health](https://phpackages.com/badges/ivovalchev-twig-truncate-html/health.svg)](https://phpackages.com/packages/ivovalchev-twig-truncate-html)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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