Move everything to content subdir

main
jri 9 months ago
parent 1173d26514
commit b423a72171

@ -0,0 +1,23 @@
def before_apply_all [ctx] {
let silo_ctx = (silo context | from json)
let config_file = ($silo_ctx.dirs.config | path join "silo.toml")
mut config = open_config $config_file
$config.template_context = ($config.template_context | default {} | merge (template_context $ctx $silo_ctx $config))
$config | save -f $config_file
}
def open_config [path: string] {
if ($path | path exists) {
open $path
} else {
{}
}
}
def template_context [ctx: any, silo_ctx: any, config: any] {
{
username: (whoami)
}
}
Loading…
Cancel
Save