Cottle 2.0.8

.NET 5.0 .NET Standard 2.0 .NET Framework 4.7.2
Install-Package Cottle -Version 2.0.8
dotnet add package Cottle --version 2.0.8
<PackageReference Include="Cottle" Version="2.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cottle --version 2.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cottle, 2.0.8"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Cottle as a Cake Addin
#addin nuget:?package=Cottle&version=2.0.8

// Install Cottle as a Cake Tool
#tool nuget:?package=Cottle&version=2.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Cottle: Compact Object to Text Transform Language

Build Status NuGet license

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

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.
}
var document = Document.CreateDefault(template).DocumentOrThrow;

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

Resource

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Cottle:

Package Downloads
Softeq.NetKit.EmailService

Package Description

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Cottle:

Repository Stars
scriban/scriban
A fast, powerful, safe and lightweight scripting language and engine for .NET
EDCD/EDDI
Companion application for Elite Dangerous
cmdrmcdonald/EliteDangerousDataProvider
Version Downloads Last updated
2.0.8 6,067 6/11/2022
2.0.7 47,479 1/11/2022
2.0.5 2,646 12/29/2021
2.0.4 44,506 8/11/2021
2.0.3 17,490 6/3/2021
2.0.2 41,290 6/20/2020
2.0.1 566 5/22/2020
2.0.0 1,080 4/27/2020
1.6.2 3,141 3/15/2020
1.6.1 1,057 3/5/2020
1.6.0 5,723 12/3/2019
1.5.4 3,083 10/6/2019
1.5.3 1,793 7/17/2019
1.5.2 607 7/15/2019
1.4.3 922 3/12/2019
1.4.2 4,266 1/22/2019
1.4.1 1,233 1/4/2019
1.4.0 1,114 3/21/2017
1.3.2 1,739 2/20/2016
1.3.1 1,676 11/18/2014
1.3.0 1,513 8/11/2014
1.2.0 1,414 6/25/2014
1.1.2 2,108 2/10/2014
1.1.1 1,355 5/1/2013
1.1.0 1,517 11/14/2012
1.0.1 1,492 10/22/2012