Cottle, our templating library, presents some usability issues with our Dockerfile and Readme templates: 1. Confusing syntax with no linter/syntax highlighting support 2. Errors are difficult to track down and it's sometimes unclear what the problem is 3. Managing whitespace is difficult We should migrate to a different templating engine. The ideal templating engine would fulfill the following requirements: 1. Extensible, so that we can add our own custom functions/commands 2. Composable (Not strictly required, we currently shoehorn this into Cottle via its extensibility) 3. General-purpose enough to work for both Dockerfiles and text (Markdown) 4. Syntax highlighting and clear errors 5. Good support Some options immediately come to mind: 1. [Razor](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-9.0) - built in to .NET, but requires ASP.NET Core libraries 2. [T4](https://learn.microsoft.com/en-us/visualstudio/modeling/writing-a-t4-text-template?view=vs-2022) 3. [Fluid (Liquid)](https://github.com/sebastienros/fluid) - port of Liquid templating engine to .NET, maintained by .NET team member, popular on NuGet
Activity
lbussell commentedon Mar 3, 2025
[Triage] Related: dotnet/dotnet-docker#6251