PHPackages                             corneltek/twig-markdown - 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. corneltek/twig-markdown

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

corneltek/twig-markdown
=======================

1.0.0(10y ago)52881PHP

Since Mar 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/c9s/Twig-Markdown)[ Packagist](https://packagist.org/packages/corneltek/twig-markdown)[ RSS](/packages/corneltek-twig-markdown/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (1)

Twig-Markdown
=============

[](#twig-markdown)

convert markdowned text to html for Twig.

markdown converter is php-markdown-extra.

Install
-------

[](#install)

### Install via PEAR

[](#install-via-pear)

Install via PEAR installer locally:

```
$ pear install -f package.xml

```

Install via PEAR installer from Corneltek PEAR channel:

```
$ pear install -a corneltek/Twig_Extensions_Markdown

```

### Install via composer

[](#install-via-composer)

Install composer in your project:

```
curl -s http://getcomposer.org/installer | php
```

Create a composer.json file in your project root:

```
{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "michelf/php-markdown",
                "version": "1.0",
                "dist": {
                    "url": "https://github.com/michelf/php-markdown/zipball/extra",
                    "type": "zip"
                },
                "autoload": {
                    "files": [
                        "markdown.php"
                    ]
                }
            }
        },
        {
            "type": "vcs",
            "url": "http://github.com/geta6/Twig-Markdown"
        }
    ],
    "require": {
        "michelf/php-markdown": "1.*",
        "geta6/twig-markdown": "@dev"
    }
}
```

Run install command:

```
php composer.phar install
```

Usage
-----

[](#usage)

`{% markdown %}markdownedtext{% endmarkdown %}`

or

`{{ markdowned|markdown|raw }}`

include
-------

[](#include)

```
# use built-in twig autoloader
require_once 'Twig/Autoloader.php';
Twig_Autoloader::register();

$debug = new \Twig_Extensions_Extension_Debug;
$twig->addExtension( $debug );

$markdown = new \Twig_Extension_Markdown;
$twig->addExtension( $markdown );
```

Development
-----------

[](#development)

To update the `package.xml` file, you need to install `onion`:

todo
----

[](#todo)

むりやりincludeしてるのでもっとスマートな方法おしえてください

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 89.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 ~419 days

Total

3

Last Release

3963d ago

Major Versions

0.1.2 → 1.0.02015-07-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc34cde233b660869ff329ed8e20df611f75dfb61aab3e30889ac153d3e5e61?d=identicon)[c9s](/maintainers/c9s)

---

Top Contributors

[![c9s](https://avatars.githubusercontent.com/u/50894?v=4)](https://github.com/c9s "c9s (51 commits)")[![geta6](https://avatars.githubusercontent.com/u/665440?v=4)](https://github.com/geta6 "geta6 (6 commits)")

### Embed Badge

![Health badge](/badges/corneltek-twig-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/corneltek-twig-markdown/health.svg)](https://phpackages.com/packages/corneltek-twig-markdown)
```

###  Alternatives

[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22918.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21914.8M162](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)[symfony/ux-live-component

Live components for Symfony

1635.6M72](/packages/symfony-ux-live-component)

PHPackages © 2026

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