有人能够或至少尝试过将 Liquid 模板语言移植到 C# 吗?
我需要让最终用户能够安全地编辑 ASP.NET MVC Web 应用程序模板,到目前为止,Liquid 模板语言似乎很完美,但它是用 Ruby 编写的,移植对我来说似乎是一项过于复杂的任务,因为我不这样做不知道 Ruby...有人尝试将其移植到 C# 吗?这在很多情况下都非常有用,我将积极提供所需的帮助!
更新:我还发现了 Javascript 版本,这应该足以简化移植工作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是指 DotLiquid 吗?它是 Ruby 的 Liquid 模板语言的 .NET 4.0 端口。模板语法本身与 Liquid 相同,但 .NET 代码尽可能利用 .NET / C# 约定。它显然是开源的,与最初的 Liquid 项目相同。
披露:我编写了 DotLiquid(无论如何,我从 Ruby 进行了 C# 移植)。与原始海报一样,我也希望能够从 .NET 代码访问 Liquid 模板语法。我希望它对其他人有用。 Liquid 的 Ruby 源代码非常干净,并且包含一整套单元测试,因此移植非常简单。如果您确实发现任何错误,请
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