Templating library for generating yml files?

I want to add some lightweight scripting to my yml files. How can I do that?

EDIT: while writing this draft, I discovered EEx, which is the solution for my use case. I figure someone else might benefit so I’ll post this anyway.

1 Like

Eex or yamlr :slight_smile:

I’m curious if there is an open spec for templating, like something that has its own runtime. i.e. instead of binding to Elixir, bind to the open spec. Then your templates are cross platform.

Something like this? GitHub - soranoba/bbmustache: Binary pattern match Based Mustache template engine for Erlang/OTP.

Sadly, without a underlying programming language powering them, the options for such generic templating engines are very limited.

The problem with templating engines is they have to grow and grow until they encompass all of the features of a real programming language, except they weren’t designed that way from the start so they usually end up being bad programming languages.

React’s JSX has shown people really like just being able to embed code into their “templates” (really the templates are code).