Giter VIP home page Giter VIP logo

Comments (3)

refnode avatar refnode commented on August 12, 2024

Hi, not dead because I'm interested in that project anymore, but I don't have a chance to continue before end of april.

from liquid.

lukas-gitl avatar lukas-gitl commented on August 12, 2024

Thanks for the reply!

For anyone else looking at rendering liquid templates in python. We are using a js template engine for now like so:

import execjs


def render(template, defaults):
    with open("liquid.js", "r") as f:
        ctx = execjs.compile(
            "var document = {'getElementsByTagName': function() {return 0}};" +
            f.read() +
            "function render__(src, vars) {" +
            "var tmpl = Liquid.parse( src );" +
            "return tmpl.render(vars);" +
            "}"
        )
    return ctx().call("render__", template, defaults)

Where the liquid js file is
https://github.com/mattmccray/liquid.js/blob/cb1dab774cbf92c5936ecde0417bcdd53ffd0316/dist/liquid.js

from liquid.

refnode avatar refnode commented on August 12, 2024

Project is obsolete for me.
Archiving.

from liquid.

Related Issues (1)

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.