Project

tilt-twig

0.0
No commit activity in last 3 years
No release in over 3 years
This gem allows you to compile Twig templates within Ruby applications that support Tilt templates. This is currently not a native Ruby parser, but rather utilizes PHP command line to compile Twig templates. Data is serialized to YAML in your Ruby application and deserialized in a PHP script that passes the context to Twig.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6
>= 0
 Project Readme

Tilt::Twig

WARNING: EXPERIMENTAL

This gem allows you to compile Twig templates within Ruby applications that support Tilt templates. This is currently not a native Ruby parser, but rather utilizes PHP command line to compile Twig templates. Data is serialized to YAML in your Ruby application and deserialized in a PHP script that passes the context to Twig.

Installation

This gem has PHP dependencies, which are attempted to be installed automatically:

Add this line to your application's Gemfile:

gem 'tilt-twig'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tilt-twig

Middleman

A Middleman extension is built-in.

gem 'tilt-twig', require: 'middleman/twig'

Add the extension to the Middleman configuration:

configure :build do
  activate :twig_extension
end