mirror of
https://gitea.invidious.io/iv-org/shard-kilt.git
synced 2024-08-15 00:43:15 +00:00
Add ability to register template engine outside the library
This commit is contained in:
parent
5f23a69c15
commit
ee7059effd
3 changed files with 72 additions and 10 deletions
|
@ -1,9 +1,11 @@
|
|||
require "spec"
|
||||
require "../src/kilt"
|
||||
|
||||
require "slang"
|
||||
Kilt.register_template(".slang", embed_slang)
|
||||
|
||||
macro render_file(filename)
|
||||
String.build do |__io__|
|
||||
Kilt.embed({{filename}}, "__io__")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue