-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
html static webpages #34
Comments
Hi Sizwe, Thanks for reaching out. I'm unsure what you're trying to do exactly. Are you trying to produce an HTML response? Or physically read an HTML file from disk, and render it's contents? |
I'm trying to read html file from disk, modify and render the contents |
Thank you for the clarification! The Falco view engine won't help you with this, since it's based on pure F# functions. To me, it sounds like you need a template engine like scriban, which will efficiently replace symbols found in string literals. You can use the string you get from scriban, or another template engine with the let htmlStringHandler : HttpHandler =
let html = "{html string from template engine}"
html
|> Response.ofHtmlString For a complete example of how this works, checkout the scriban example in the sample projects directory. |
thanks, scriban sounds like exactly like what i need :). I'm closing the issue |
Hi Pim. Thanks for putting time on Falco. I'm new to both F# and Falco and I'm learning through creating stuff 馃檪 . One question I have is how do I render .html static files and edit the attributes and elements/nodes in Falco or something like template rendering.
The text was updated successfully, but these errors were encountered: