PHPackages                             neilime/geshi-twig-extension - 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. neilime/geshi-twig-extension

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

neilime/geshi-twig-extension
============================

Twig extension to work with Geshi - Generic Syntax Highlighter rendering

v4.0.0(6mo ago)35.8k[1 PRs](https://github.com/neilime/geshi-twig-extension/pulls)MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since May 20Pushed 2w ago1 watchersCompare

[ Source](https://github.com/neilime/geshi-twig-extension)[ Packagist](https://packagist.org/packages/neilime/geshi-twig-extension)[ Docs](http://neilime.github.io/geshi-twig-extension/)[ GitHub Sponsors](https://github.com/neilime)[ RSS](/packages/neilime-geshi-twig-extension/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (8)Dependencies (3)Versions (18)Used By (0)

 [![](https://repository-images.githubusercontent.com/19935239/628f1a00-eb4f-11e9-848a-0d9aa0369eee)](https://neilime.github.io/geshi-twig-extension)

Geshi Twig Extension
====================

[](#geshi-twig-extension)

[![Continuous Integration](https://github.com/neilime/geshi-twig-extension/actions/workflows/main-ci.yml/badge.svg)](https://github.com/neilime/geshi-twig-extension/actions/workflows/main-ci.yml)[![codecov](https://camo.githubusercontent.com/289d184918e1b846f54eaece413b880f8b69d7dc399a4e62ca205abd761acfc8/68747470733a2f2f636f6465636f762e696f2f67682f6e65696c696d652f67657368692d747769672d657874656e73696f6e2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d654d7577674e7562375a)](https://codecov.io/gh/neilime/geshi-twig-extension)[![Latest Stable Version](https://camo.githubusercontent.com/0ebb07bf6dba48a0c5ea302382745d7b48668b86285fc662149480ca825dc4c1/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f67657368692d747769672d657874656e73696f6e2f762f737461626c65)](https://packagist.org/packages/neilime/geshi-twig-extension)[![Total Downloads](https://camo.githubusercontent.com/f37266be8b769ec1a4bedb1ccbc98c3ec7229e2877f5afdf8d223177893fcfda/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f67657368692d747769672d657874656e73696f6e2f646f776e6c6f616473)](https://packagist.org/packages/neilime/geshi-twig-extension)[![License](https://camo.githubusercontent.com/54c912428f3f80be3dd0508cb22b5d9d9235f15893b89fba786bc028b2fe7cac/68747470733a2f2f706f7365722e707567782e6f72672f6e65696c696d652f67657368692d747769672d657874656e73696f6e2f6c6963656e7365)](https://packagist.org/packages/neilime/geshi-twig-extension)[![Sponsor](https://camo.githubusercontent.com/f55c88fe25eb9b7cab4ae4a50e9720925d200d5141d70e4224ecd6bd179de3e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2545322539442541342d53706f6e736f722d666636396234)](https://github.com/sponsors/neilime)

📢 **Geshi Twig Extension** is a [Twig](https://twig.symfony.com) extension for [GeSHi - Generic Syntax Highlighter rendering](https://github.com/GeSHi/geshi-1.0).

```
{{ '' | geshi('php') }}
```

```
{% geshi 'javascript' %}
    {"data": "test"}
{% endgeshi %}
```

Helping Project
---------------

[](#helping-project)

❤️ If this project helps you reduce time to develop and/or you want to help the maintainer of this project. You can [sponsor](https://github.com/sponsors/neilime) him. Thank you !

Contributing
------------

[](#contributing)

👍 If you wish to contribute to this project, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file. Note: If you want to contribute don't hesitate, I'll review any PR.

Documentation
-------------

[](#documentation)

### [Installation](./docs/installation.md)

[](#installation)

### [Usage](./docs/usage.md)

[](#usage)

### [Development](./docs/development.md)

[](#development)

### [Code Coverage](https://codecov.io/gh/neilime/geshi-twig-extension)

[](#code-coverage)

### [PHP Doc](https://neilime.github.io/geshi-twig-extension/phpdoc)

[](#php-doc)

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance84

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 58.5% 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 ~604 days

Recently: every ~566 days

Total

8

Last Release

187d ago

Major Versions

0.3.0 → v2.0.02019-10-10

v2.1.0 → v3.0.02024-08-29

v3.1.0 → v4.0.02025-12-22

PHP version history (4 changes)v2.0.0PHP ^7.2

v3.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

v3.1.0PHP ^8.1

v4.0.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cd480ea3050a483f3e08c365a6d847402b4edb110d706111d13ef33b845ef9f?d=identicon)[neilime](/maintainers/neilime)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (93 commits)")[![neilime](https://avatars.githubusercontent.com/u/314088?v=4)](https://github.com/neilime "neilime (58 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

twigSyntax highlightergeshi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/neilime-geshi-twig-extension/health.svg)

```
[![Health](https://phpackages.com/badges/neilime-geshi-twig-extension/health.svg)](https://phpackages.com/packages/neilime-geshi-twig-extension)
```

###  Alternatives

[timber/timber

Create WordPress themes with beautiful OOP code and the Twig Template Engine

5.7k3.6M127](/packages/timber-timber)[twig/intl-extra

A Twig extension for Intl

36667.2M319](/packages/twig-intl-extra)[symfony/ux-twig-component

Twig components for Symfony

21917.2M308](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1636.5M114](/packages/symfony-ux-live-component)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22919.7M81](/packages/twig-cssinliner-extra)[twig/inky-extra

A Twig extension for the inky email templating engine

16713.2M70](/packages/twig-inky-extra)

PHPackages © 2026

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