You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Top level keys prefixed with x- are discarded. This makes it easier to leverage YAML anchors and aliases, while avoiding Caddy errors due to unknown fields.
Without the Caddyfile, Caddy's native configuration limits to runtime environment variables.
There are use cases for knowing the environment variables at configuration time. e.g. troubleshooting purposes.
listen: "#{ $PORT }"
If the above features are not needed or utilised, the behaviour is identical to iamd3vil/caddy_yaml_adapter.
Note that both adapters cannot be built with Caddy, they are incompatible. They both register as yaml config adapter and at most one config adapter is allowed per config format.
Templating
Anything supported by Go templates can be used, as well as any Sprig function.
Delimeters
Delimeters are #{ and }. e.g. #{ .title }. The choice of delimeters ensures the YAML config file remains a valid YAML file that can be validated by the schema.
Values
Extension fields can be reused anywhere else in
the YAML config.
x-hello: Hello from YAML templatex-nest:
value: nesting