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

1

5

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.

Avra answered 8/2, 2010 at 18:50 Comment(2)
Yes this would be a nice library to have in C#. There is the new Razor view engine - but that allows any C# method to be called which is obviously not safe to run on your web server!Leyba
Maybe you could use IronRuby and see if you can get it working that wayLeyba
T
14

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

Toback answered 20/8, 2010 at 10:2 Comment(5)
Tim, that is exactly what I was looking for!!! Can you get in contact with me via email? mine is [email protected]Avra
I tried sending you an email but it failed with "550 550 #5.1.0 Address rejected. (state 14)". My email is tim at roasted-amoeba dot com, without the hyphen.Toback
Awesome, thanks for posting the link to the project. Looking forward to checking out the code and contributing if neededPeccable
I sent you an email to that address, and also a message on github.Avra
ops... I just noticed that my email was mispelled, the right one is mj1686 at mclink dot itAvra

© 2022 - 2024 — McMap. All rights reserved.