Cottle 2.1.0

dotnet add package Cottle --version 2.1.0
                    
NuGet\Install-Package Cottle -Version 2.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cottle" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cottle" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cottle" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cottle --version 2.1.0
                    
#r "nuget: Cottle, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cottle@2.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cottle&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cottle&version=2.1.0
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cottle:

Package Downloads
GenHTTP.Modules.Pages

Allows to generate and serve HTML pages

Softeq.NetKit.EmailService

Package Description

GitHub repositories (6)

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

Repository Stars
scriban/scriban
A fast, powerful, safe and lightweight scripting language and engine for .NET
Macro-Deck-App/Macro-Deck
The open-source macro pad with customizable widgets, powerful integrations and a secure plugin ecosystem.
EDCD/EDDI
Companion application for Elite Dangerous
Kaliumhexacyanoferrat/GenHTTP
Lightweight embeddable web server written in pure C# with few dependencies to 3rd-party libraries.
dotnet/docker-tools
This is a repo to house some common tools for our various docker repos.
cmdrmcdonald/EliteDangerousDataProvider
Version Downloads Last Updated
2.1.0 843,707 2024/7/2
2.0.12 65,484 2024/3/27
2.0.11 17,498 2024/3/7
2.0.10 201,938 2023/7/13
2.0.9 268,567 2023/3/21
2.0.8 147,110 2022/6/11
2.0.7 50,955 2022/1/11
2.0.5 4,065 2021/12/29
2.0.4 50,630 2021/8/11
2.0.3 19,396 2021/6/3
2.0.2 71,800 2020/6/20
2.0.1 1,661 2020/5/22 2.0.1 is deprecated because it has critical bugs.
2.0.0 2,067 2020/4/27
1.6.2 4,051 2020/3/15
1.6.1 1,933 2020/3/5 1.6.1 is deprecated because it has critical bugs.
1.6.0 6,455 2019/12/3
1.5.4 3,904 2019/10/6
1.5.3 2,531 2019/7/17
Loading failed