Following the instructions in the Stencil documentation, I registered a simple custom tag:
let ns = Namespace()
ns.registerSimpleTag("contact") { context in
return "<a href=\"/contact\">contact us</a>"
}
but I can't see how to pass the namespace to render
, as response.render
only takes a dictionary, not an actual Context
object.
What am I missing? Is there a pre-existing namespace somewhere I should be using instead of creating one myself?