Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cottle

> 前端框架
Open source

Fast, light & extensible template engine for C#

181 stars0 likes1 views
WebsiteGitHub

About

Fast, light & extensible template engine for C#

Cottle: Compact Object to Text Transform Language

Overview

Cottle is an open-source (MIT) templating engine for C# .NET designed to be light (no external dependency & simple API), fast (see benchmark) and extensible (see advanced features).

Sample

bash
Hello, {name}!

{if len(messages) > 0:
    You have {len(messages)} new message{if len(messages) > 1:s} in your mailbox!
|else:
    You have no new message.
}
cs
var document = Document.CreateDefault(template).DocumentOrThrow;

return document.Render(Context.CreateBuiltin(new Dictionary
{
    ["messages"] = GetMessages(),
    ["name"] = "JC Denton"
}));

Resource

  • Home page: https://r3c.github.io/cottle/
  • Documentation: https://cottle.readthedocs.io/
  • Benchmark: https://r3c.github.io/cottle/benchmark.html
  • NuGet package: https://www.nuget.org/packages/Cottle
  • Contact: v.github.com+cottle [at] mirari [dot] fr
  • License: license.md

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#c-sharpdotnetdotnetcoreengine

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架