Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has anyone been able or at least tried to port Liquid Template Language to C#?

I need to give end-users the ability to securely edit an asp.net mvc web application templates and so far Liquid Template Language seems to be perfect, but it is written in Ruby and porting it seems a too complex task for me as I don't know Ruby... anyone tried to port it to C#? It would be really useful in a lot of situations and I'm going to actively help for what is needed!

Update: I also found out a Javascript version, this should ease the porting enough.

like image 974
MJ1686 Avatar asked Feb 08 '10 18:02

MJ1686


1 Answers

Do you mean DotLiquid? It's a .NET 4.0 port of the Liquid template language for Ruby. The template syntax itself is the same as Liquid, but the .NET code takes advantage of .NET / C# conventions as much as possible. It's obviously open source, same as the original Liquid project.

Disclosure: I wrote DotLiquid (well, I did the C# port from Ruby, anyway). Like the original poster, I also wanted to have access to Liquid template syntax from .NET code. I'm hoping it's useful for other people. Liquid's Ruby source code is very clean, and included a full suite of unit tests, so it made porting quite straightforward. If you do find any bugs, please

like image 138
Tim Jones Avatar answered Sep 21 '22 00:09

Tim Jones