String Interpolation in config.toml

Hi,

Is string interpolation support in the config.toml file? As an example:

baseUrl = "https://example.com/${path}/"
path = "blog"

Thanks,
Noel

Hello @noelob,

it’s not possible to interpolate strings. But for your usecase it might make sense to set the base url via an environment variable.

Thanks, that’s what I thought. I’ve been using the -b CLI flag from our build system to accomplish what you suggest. I thought it might be neat to read the path directly from config.toml rather than have it hardcode in the build tool.

Thanks for confirming.

How is the latter more hardcoded than the first?

Right now its in config.toml as path of the baseUrl, but also defined in a rake task as a a value to override using -b.

I was hoping to have the path defined in just one place. I can update the rake task to parse it from baseUrl but I was curious if interpolation bwas possible as it would save me having to do any parsing of fields in confg.toml.