Closed sorawee closed 5 years ago
One of the items under "General Template Tips" in the docs is this:
5.5.2 Use
local-require
in templatesIf you need to require a Racket module in your template, you must use
local-require
. Plainrequire
won’t work because the template is not evaluated at a module level or top level.
Does that help?
This addresses my issue. Thanks :)
Say, I want to call
(date->string date-struct)
. However,date->string
is inracket/date
, but we can't require it either because template rendering doesn't seem to allowrequire
.A way that I am currently using is:
which is obviously not ideal.
It would be nice to be able to supply user-custom variables for template rendering.