Sunday, 8 September 2013

How to turn a jade page into html?

How to turn a jade page into html?

I have a jade file called syntax.jade. What I need is a way to convert
syntax.jade, along with the information I would normally pass it with a
res.render statement, into a html document in node so that I can
manipulate it in that form. Basically what I want is this:
when I use
res.render('syntax', {comment: comment}, function(err, html))
html contains the html of the page as a string. I need another way to get
that code that doesn't require me to render the page in the browser.
The reason I want to do this is so that I can include the resulting HTML
code in another res.render statement in order to provide formatting
instead of doing all the formatting in the front end.

No comments:

Post a Comment