[web-devel] rendering hamlet (esp julius) manually
michael at snoyman.com
Sat Jan 1 22:01:20 CET 2011
On Fri, Dec 31, 2010 at 2:31 PM, Max Cantor <mxcantor at gmail.com> wrote:
> var URL_HOME = "http://localhost";
> // var URL_HOME = "http://myhost";
> var URL_PROFILE = URL_HOME + "/boo";
> If its possible to render julius without a request, then I could do this:
> var URL_HOME = @HomeR@;
> var URL_PROFILE = @ProfileR@;
> and add a small executable to generate the JS file.
> So, how would one do this?
> Sorry if this is obvious, i spent some time trying and digging around the haddocks, didn't find an answer.
> happy new years,
Well, the first thing you'd want to look at is renderJulius. For
that to work, you'll need the URL rendering function, which is what I
assume you're asking for, and is slightly harder to get. For that,
you'll probably want the joinPath method of the Yesod typeclass. Let
me know if you have trouble, I can (at a later date) write up an
More information about the web-devel