Giter Site home page Giter Site logo

html static webpages about falco HOT 4 CLOSED

pimbrouwers avatar pimbrouwers commented on May 22, 2024
html static webpages

from falco.

Comments (4)

pimbrouwers avatar pimbrouwers commented on May 22, 2024

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?

from falco.

May4m avatar May4m commented on May 22, 2024

I'm trying to read html file from disk, modify and render the contents

from falco.

pimbrouwers avatar pimbrouwers commented on May 22, 2024

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 Response.ofHtmlString in order to render the HTML with Falco.

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.

from falco.

May4m avatar May4m commented on May 22, 2024

thanks, scriban sounds like exactly like what i need :). I'm closing the issue

from falco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.