Giter Club home page Giter Club logo

solid's Introduction

Solid Build Status

Solid is an implementation in Elixir of the template engine Liquid. It uses nimble_parsec to generate the parser.

Basic Usage

iex> template = "My name is {{ user.name }}"
iex> {:ok, template} = Solid.parse(template)
iex> Solid.render(template, %{ "user" => %{ "name" => "José" } }) |> to_string
"My name is José"

Installation

The package can be installed with:

def deps do
  [{:solid, "~> 0.8"}]
end

Contributing

When adding new functionality or fixing bugs consider adding a new test case here inside test/cases. These cases are tested against the Ruby gem so we can try to stay as close as possible to the original implementation.

TODO

  • Integration tests using Liquid gem to build fixtures; #3
  • All the standard filters #8
  • Support to custom filters #11
  • Tags (if, case, unless, etc)
    • for
      • else
      • break
      • continue
      • limit
      • offset
      • Range (3..5)
      • reversed
      • forloop object
    • raw #18
    • cycle #17
    • capture #19
    • increment #16
    • decrement #16
  • Boolean operators #2
  • Whitespace control #10

solid's People

Contributors

barkerja avatar bluzky avatar cjbell avatar dependabot-preview[bot] avatar edgurgel avatar iautom8things avatar jalcine avatar jcambass avatar jeroenvisser101 avatar karlseguin avatar lostkobrakai avatar markglenn avatar mayankgureja avatar sb8244 avatar sirfitz avatar wmnnd avatar wtcross avatar

Watchers

 avatar  avatar

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.