mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
346 B
346 B
Views
You can use ECR to build views. Kemal serves a render
macro to use built-in ECR
library.
Writing Views
The ECR is actually ERB.
src/
views/
hello.ecr
Write hello.ecr
Hello <%= your_name %>
Embedding View File
get '/' do |env|
your_name = "Kemal"
render "views/hello.ecr"
end