Pope: Micro templating engine for strings only

A fast, minimal and micro template engine for strings only, it plays well where you want to embed micro templates inside your module.


See the API page > https://krthr.github.io/pope.cr/

require "pope.cr"

data = {
  user: {
    id:       123,
    username: "krthr",
    admin:    true,
    config:   {
      email: "test@test.com",

  "The user {{user.username}} with id {{user.id}} is cool",
) # "The user krthr with id 123 is cool"

Pope.prop(data, "user.id")           #  123
Pope.prop(data, "user.config.email") # test@test.com
Pope.prop(data, "nananana")          # nil
1 Like