mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Abstract template engines with Kilt
This commit is contained in:
parent
8c87a3fa67
commit
9404fa5c80
2 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,8 @@ version: 0.9.0
|
||||||
dependencies:
|
dependencies:
|
||||||
radix:
|
radix:
|
||||||
github: luislavena/radix
|
github: luislavena/radix
|
||||||
|
kilt:
|
||||||
|
github: jeromegn/kilt
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Serdar Dogruyol <dogruyolserdar@gmail.com>
|
- Serdar Dogruyol <dogruyolserdar@gmail.com>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require "ecr/macros"
|
require "kilt"
|
||||||
|
|
||||||
# Uses built-in ECR to render views.
|
# Uses built-in ECR to render views.
|
||||||
# # Usage
|
# # Usage
|
||||||
|
@ -7,7 +7,7 @@ require "ecr/macros"
|
||||||
# end
|
# end
|
||||||
macro render(filename)
|
macro render(filename)
|
||||||
__view__ = String::Builder.new
|
__view__ = String::Builder.new
|
||||||
embed_ecr({{filename}}, "__view__")
|
Kilt.embed({{filename}}, "__view__")
|
||||||
__view__.to_s
|
__view__.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue