refactor: improve docusaurus site creation and handling

- Change site.new to always create/overwrite a site
- Add early exit to site.play if no config exists
- Use explicit sitename from docusaurus.config
- Enable openai.play action processing
- Remove debug code and improve struct initialization
This commit is contained in:
Mahmoud-Emad
2025-08-07 13:42:53 +03:00
parent daf6ce5126
commit 843b20804b
6 changed files with 10 additions and 14 deletions

View File

@@ -15,12 +15,6 @@ pub mut:
pub fn new(args FactoryArgs) !&Site {
name := texttools.name_fix(args.name)
// Check if a site with this name already exists
if name in websites {
// Return the existing site instead of creating a new one
return get(name: name)!
}
websites[name] = &Site{
siteconfig: SiteConfig{
name: name