func TestSite(t *testing.T) { stesting.Golden( t, static.GeneratorFunc(Generate), ) }
package example import ( "fmt" "html/template" "simplex.sh/container" "simplex.sh/paginate" "simplex.sh/shttp" "simplex.sh/static" "time" ) var _ = container.App(func(app *container.Application) { app.Name = "example" app.Generator = static.GeneratorFunc(Generate) app.ExtraHosts = []string{"example.dev.", "*."} }) type Article struct { Id int Title string Body string PublishedAt time.Time } func Generate(tx *static.Tx) { var ( articles *static.C )