{"id":13431746,"url":"https://github.com/dotliquid/dotliquid","last_synced_at":"2025-05-14T13:09:15.996Z","repository":{"id":1020059,"uuid":"847744","full_name":"dotliquid/dotliquid","owner":"dotliquid","description":".NET Port of Tobias Lütke's Liquid template language.","archived":false,"fork":false,"pushed_at":"2025-04-02T14:26:26.000Z","size":10031,"stargazers_count":1070,"open_issues_count":55,"forks_count":296,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-11T18:21:31.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.dotliquid.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotliquid.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.markdown","contributing":"contributing.md","funding":null,"license":"LICENSE-Apache","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-08-19T01:50:46.000Z","updated_at":"2025-04-07T05:39:29.000Z","dependencies_parsed_at":"2023-01-13T10:51:45.636Z","dependency_job_id":"fb57ea7a-4d93-4f94-a634-b1a2e94cd523","html_url":"https://github.com/dotliquid/dotliquid","commit_stats":{"total_commits":494,"total_committers":79,"mean_commits":6.253164556962025,"dds":0.811740890688259,"last_synced_commit":"abb756248c0ef4652336026c002bc927db58e26b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotliquid%2Fdotliquid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotliquid%2Fdotliquid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotliquid%2Fdotliquid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotliquid%2Fdotliquid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotliquid","download_url":"https://codeload.github.com/dotliquid/dotliquid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149975,"owners_count":22022852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:05.554Z","updated_at":"2025-05-14T13:09:10.983Z","avatar_url":"https://github.com/dotliquid.png","language":"C#","readme":"﻿# DotLiquid\n\n[![DotLiquid tag on Stack Overflow](https://img.shields.io/badge/stackoverflow-dotliquid-orange.svg)](https://stackoverflow.com/questions/tagged/dotliquid)\n[![AppVeyor Build](https://ci.appveyor.com/api/projects/status/xlev396hlh37s3to/branch/master?svg=true)](https://ci.appveyor.com/project/microalps/dotliquid/branch/master)\n[![codecov](https://codecov.io/gh/dotliquid/dotliquid/branch/master/graph/badge.svg)](https://codecov.io/gh/dotliquid/dotliquid)\n[![NuGet](https://img.shields.io/nuget/v/dotliquid.svg)](https://www.nuget.org/packages/dotliquid)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotliquid/dotliquid?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n## Maintainers wanted\n\nHave you sent a PR to this repository? In that case, would you consider getting\nin touch with me so I can give you commit access to this repository? Please ping\nme at [gitter/dotliquid](https://gitter.im/dotliquid/dotliquid) or here on\ngithub.\n\n### What is this?\n\nDotLiquid is a .Net port of the popular [Ruby Liquid templating\nlanguage](https://shopify.github.io/liquid/). It is a separate project that aims to\nretain the same template syntax as the original, while using .NET coding\nconventions where possible.\n\nFor more information about the original Liquid project, see\n\u003chttps://shopify.github.io/liquid/\u003e.\n\n### Quick start\n\n1. Download the latest release from [NuGet](https://www.nuget.org/packages/dotliquid).\n2. Read the [docs](//github.com/dotliquid/dotliquid/wiki) for information\n   on writing and using DotLiquid templates.\n\n### Why should I use DotLiquid?\n\n* You want to leave business logic in your compiled controllers and out of your templates.\n* You're looking for a logic-less template language that also exists for other platforms (ie: node, python).\n* You want to allow your users to edit their own page templates, but want to\n  ensure they don't run insecure code.\n* You want to render templates directly from the database.\n* You want a template engine for emails.\n\n### What does it look like?\n\n``` liquid\n\u003cul id=\"products\"\u003e\n  {% for product in products %}\n    \u003cli\u003e\n      \u003ch2\u003e{{product.name}}\u003c/h2\u003e\n      Only {{product.price | price }}\n\n      {{product.description | prettyprint | paragraph }}\n    \u003c/li\u003e\n  {% endfor %}\n\u003c/ul\u003e\n```\n\n### How to use DotLiquid\n\nDotLiquid supports a very simple API based around the DotLiquid.Template class.\nGenerally, you can read the contents of a file into a template, and then render\nthe template by passing it parameters in the form of a `Hash` object. There are\nseveral ways you can construct a `Hash` object, including from a Dictionary, or\nusing the `Hash.FromAnonymousObject` method.\n\n```c#\nTemplate template = Template.Parse(\"hi {{name}}\"); // Parses and compiles the template\ntemplate.Render(Hash.FromAnonymousObject(new { name = \"tobi\" })); // =\u003e \"hi tobi\"\n```\n\n### Projects using DotLiquid\n\nAre you using DotLiquid in an open source project? Tell us with a PR!\n\n - [Suave.DotLiquid](https://github.com/SuaveIO/suave#introduction)\n - [Pretzel](https://github.com/Code52/Pretzel)\n - [Docfx](https://github.com/dotnet/docfx)\n - [DotLiquid.Mailer](https://github.com/miseeger/DotLiquid.Mailer)\n - [DotLiquid Template Engine for Suave.IO](https://www.nuget.org/packages/Suave.DotLiquid/)\n - [DotLiquid Template Engine for Giraffe](https://github.com/giraffe-fsharp/Giraffe.DotLiquid)\n - [DotLiquid View Engine for ASP.NET MVC](https://www.nuget.org/packages/DotLiquid.ViewEngine)\n - [DotLiquid View Engine for Nancy](https://www.nuget.org/packages/Nancy.Viewengines.DotLiquid)\n - [GrandNode 2.0](https://github.com/grandnode/grandnode2)\n\n### License\nDotLiquid is intended to be used in both open-source and commercial environments. To allow its use in as many\nsituations as possible, DotLiquid is dual-licensed. You may choose to use DotLiquid under either the [Apache License,\nVersion 2.0](LICENSE-Apache), or the [Microsoft Public License (Ms‑PL)](LICENSE-Ms-PL). These licenses are essentially identical, but you are\nencouraged to evaluate both to determine which best fits your intended use.\n","funding_links":[],"categories":["Frameworks, Libraries and Tools","Text-Template","others","Libraries","C# #","框架, 库和工具","Template Engine","模板引擎","Identifiers"],"sub_categories":["Template Engine","Templating","模板引擎","GUI - other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotliquid%2Fdotliquid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotliquid%2Fdotliquid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotliquid%2Fdotliquid/lists"}