dflydev / github-gist-twig-extension
GitHub Gist Twig Extension
v2.0.1
2012-08-15 16:12 UTC
Requires
- php: >=5.3.2
- twig/twig: >=1.9.1,<2.0-dev
Requires (Dev)
- mikey179/vfsstream: 1.*
README
A simple Twig extension for embedding GitHub Gist snippets into Twig templates.
Requirements
- PHP: >=5.3.2
- Twig: >=1.5,<2
Usage
<?php use Dflydev\Twig\Extension\GitHubGist\GistTwigExtension; $gistTwigExtension = new GistTwigExtension(); $twig->addExtension($gistTwigExtension);
Once enabled, gists can be embedded by:
{{ gist(3360578) }}
Advanced Usage
The GistTwigExtension
can optionally accept a TransportInterface
and a CacheInterface
implementation. By default NativePhpTransport
and ArrayCache
are selected if not specified.
License
MIT, see LICENSE.
Community
If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net.