A fast, secure .NET template engine implementing the Liquid language with async support and extensibility.
Fluid is a .NET template engine that implements the Liquid template language, providing a secure and high-performance way to render dynamic content. It solves the need for a safe templating system where templates can be written by non-programmers without risking application security. The engine supports async operations, custom extensions, and integrates seamlessly with ASP.NET MVC.
.NET developers building web applications, CMS platforms, or email templating systems that require safe, user-editable templates. It's also suitable for projects needing a Razor alternative with Liquid syntax.
Developers choose Fluid for its combination of strict security model, exceptional performance benchmarks, and full Liquid language compliance. Its async capabilities and deep extensibility make it uniquely suited for modern .NET applications.
Fluid is an open-source .NET template engine based on the Liquid template language.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarked as the fastest .NET Liquid implementation, Fluid parses and renders templates with minimal memory allocations, outperforming alternatives like Scriban and DotLiquid by significant margins.
Implements allow-listing of object members, preventing templates from accessing unauthorized properties, which is critical for safe user-editable content in CMS or email systems.
Supports async filters out of the box, enabling efficient database queries and I/O operations within templates without blocking threads, ideal for high-load web applications.
Allows customization of filters, tags, operators, and value converters, with access to the AST for advanced template analysis and alteration, adapting to complex business logic.
Provides a full-featured view engine replacement for Razor in MVC, supporting layouts, sections, and view start files, making adoption straightforward for .NET developers.
The recommended version is 2.0.0-beta with acknowledged API variations, posing risks for production stability and potential breaking changes during upgrades.
Requires explicit allow-listing of all object members, which can be tedious and error-prone for large or complex models, adding setup overhead.
Creating custom tags and filters requires understanding Fluid's grammar and AST visitor patterns, which may deter quick customizations compared to simpler engines.
Optimal performance depends on manual caching of IFluidTemplate instances, adding application design complexity and potential cache management issues if not handled carefully.