feat: add custom Datastar.js configuration support

Allow users to provide their own Datastar.js script (e.g., Datastar Pro
or custom builds) via Via's Options configuration. Adds DatastarConfig
struct with Content ([]byte) and Path (string) fields.
This commit is contained in:
Ryan Hamamura
2026-01-14 01:47:39 -10:00
parent 03b6d7453a
commit ea7b9ad4a1
4 changed files with 101 additions and 15 deletions

1
h/h.go
View File

@@ -79,7 +79,6 @@ func HTML5(p HTML5Props) H {
Body: retype(p.Body),
HTMLAttrs: retype(p.HTMLAttrs),
}
gp.Head = append(gp.Head, Script(Type("module"), Src("/_datastar.js")))
return gc.HTML5(gp)
}