[web-devel] [Yesod] ANN: Wai routes 0.7

Anupam Jain ajnsit at gmail.com
Mon Jun 29 03:00:52 UTC 2015


On Sun, Jun 28, 2015 at 10:18 AM, Njagi Mwaniki
<mwanikibusiness at gmail.com> wrote:
> Another question for you. How can I or recreate the results of functions
> like widgetFile in yesod? I want to use julius, lucius and hamlet in my
> wai-routes app.

You don't need a widgetFile function to use Julius and Lucius in
wai-routes. Take a look at this small example -
https://github.com/ajnsit/wai-routes/blob/master/examples/Hamlet.hs -
on how to render Cassius from an external file. The process for
including Julius or Lucius should be fairly similar to Cassius.

Note that Wai-routes 0.7.1 includes a function called `showRouteQuery`
(http://hackage.haskell.org/package/wai-routes-0.7.1/docs/Network-Wai-Middleware-Routes-Routes.html#v:showRouteQuery)
which is a route renderer in the format that Shakespearean templates
expect.

-- Anupam


More information about the web-devel mailing list