Skip to content

Instantly share code, notes, and snippets.

@wojtekmach
Created January 3, 2012 23:36
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wojtekmach/1557585 to your computer and use it in GitHub Desktop.
Save wojtekmach/1557585 to your computer and use it in GitHub Desktop.
Slim + handlebars
module Tilt
class HandlebarsSlimTemplate < ::Slim::Template; end
register HandlebarsSlimTemplate, :handlebars_slim
end
class Slim::EmbeddedEngine
register :handlebars, TagEngine, tag: :script, attributes: { type: "text/x-handlebars" }
register :handlebars_slim, TagEngine, tag: :script, attributes: { type: "text/x-handlebars" }, engine: StaticTiltEngine
end
@deepakkumarnd
Copy link

@wojtekmach Could you provide a sample, template example? How can I give an id to embedded code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment