hashnz/twig-markdown-bundle

Wrapper for https://github.com/aptoma/twig-markdown

Installs: 2 918

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

1.0.0 2014-09-03 01:51 UTC

This package is not auto-updated.

Last update: 2023-12-04 23:39:45 UTC


README

Symfony2 bundle wrapping aptoma/twig-markdown.

Installation

Add to composer.json

{
    "require": {
        "hashnz/twig-markdown-bundle": "dev-master"
    }
}

Register the bundle in app/AppKernel.php

$bundles = array(
    // ...
    new Hashnz\TwigMarkdownBundle\HashnzTwigMarkdownBundle(),
);

Usage

As a filter

{{ "# Heading Level 1"|markdown }}

As a tag

{% markdown %}
# Heading Level 1

* List item 1
* List item 2
    * Sub List Item
        * Sub Sub List Item
{% endmarkdown %}