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
Requires
- php: >=5.4
- aptoma/twig-markdown: ~1.0
- michelf/php-markdown: ~1.3
- symfony/symfony: ~2.1
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 %}