This commit is contained in:
2025-08-04 07:05:04 +02:00
parent 52f7a7a2b8
commit 07bd258e54
12 changed files with 223 additions and 296 deletions

View File

@@ -30,9 +30,7 @@ pub fn play(mut plbook PlayBook) ! {
fn play_config_single(action Action) !&Site {
mut p := action.params
name := p.get('name') or {
// If name is not specified, try to derive it from title or use a default
title := p.get_default('title', 'default-site')!
texttools.name_fix(title)
return error('need to specify name in site.config.\n${action}')
}
mut website := new(name: name)!
@@ -47,6 +45,7 @@ fn play_config_single(action Action) !&Site {
config.url = p.get_default('url', config.url)!
config.base_url = p.get_default('base_url', config.base_url)!
config.url_home = p.get_default('url_home', config.url_home)!
config.name = name
return website
}