Skip to content

Migrate off of Cottle templating engine #1610

@lbussell

Description

@lbussell

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 - built in to .NET, but requires ASP.NET Core libraries
  2. T4
  3. Fluid (Liquid) - port of Liquid templating engine to .NET, maintained by .NET team member, popular on NuGet

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions