https://github.com/dflydev/dflydev-github-gist-twig-extension
GitHub Gist Twig Extension
https://github.com/dflydev/dflydev-github-gist-twig-extension
Last synced: 11 months ago
JSON representation
GitHub Gist Twig Extension
- Host: GitHub
- URL: https://github.com/dflydev/dflydev-github-gist-twig-extension
- Owner: dflydev
- License: mit
- Created: 2012-02-07T06:31:58.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-08-15T16:16:04.000Z (almost 14 years ago)
- Last Synced: 2025-04-14T02:28:50.463Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 129 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-twig - Gist - A simple Twig extension for embedding GitHub Gist snippets into Twig templates. (Twig / Extensions)
- awesome-twig - Gist - A simple Twig extension for embedding GitHub Gist snippets into Twig templates. (Twig / Extensions)
README
GitHub Gist Twig Extension
==========================
A simple [Twig](http://twig.sensiolabs.org/) extension for embedding
[GitHub](http://github.com) [Gist](http://gist.github.com) snippets
into Twig templates.
Requirements
------------
* PHP: >=5.3.2
* Twig: >=1.5,<2
Usage
-----
```php
addExtension($gistTwigExtension);
```
Once enabled, gists can be embedded by:
```twig
{{ 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](irc://irc.freenode.net/#dflydev) channel on irc.freenode.net.