You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you sent a PR to this repository? In that case, would you consider getting
in touch with me so I can give you commit access to this repository? Please ping
me at gitter/dotliquid or here on
github.
What is this?
DotLiquid is a .Net port of the popular Ruby Liquid templating
language. It is a separate project that aims to
retain the same template syntax as the original, while using .NET coding
conventions where possible.
DotLiquid supports a very simple API based around the DotLiquid.Template class.
Generally, you can read the contents of a file into a template, and then render
the template by passing it parameters in the form of a Hash object. There are
several ways you can construct a Hash object, including from a Dictionary, or
using the Hash.FromAnonymousObject method.
Templatetemplate=Template.Parse("hi {{name}}");// Parses and compiles the templatetemplate.Render(Hash.FromAnonymousObject(new{name="tobi"}));// => "hi tobi"
Projects using DotLiquid
Are you using DotLiquid in an open source project? Tell us with a PR!
DotLiquid is intended to be used in both open-source and commercial environments. To allow its use in as many
situations as possible, DotLiquid is dual-licensed. You may choose to use DotLiquid under either the Apache License,
Version 2.0, or the Microsoft Public License (Ms‑PL). These licenses are essentially identical, but you are
encouraged to evaluate both to determine which best fits your intended use.
About
.NET Port of Tobias Lütke's Liquid template language.