diff --git a/pages/generatehtml.go b/pages/generatehtml.go index 94d6ba2499..f822d3ad29 100644 --- a/pages/generatehtml.go +++ b/pages/generatehtml.go @@ -24,6 +24,7 @@ import ( func init() { // We override the OnChildAdded set in core/generatehtml.go core.ExternalParent.AsWidget().SetOnChildAdded(func(n tree.Node) { + fmt.Println("oka") var pg *Page n.AsTree().WalkDown(func(n tree.Node) bool { if pg != nil { @@ -39,12 +40,14 @@ func init() { fmt.Println(core.GenerateHTML(n.(core.Widget))) // basic fallback os.Exit(0) } + fmt.Println("pg", pg) data := &ppath.PreRenderData{ Description: map[string]string{}, HTML: map[string]string{}, } pg.UpdateTree() // need initial update first for u := range pg.urlToPagePath { + fmt.Println("open", u) pg.OpenURL("/"+u, false) data.HTML[u] = core.GenerateHTML(pg) desc := "" @@ -64,6 +67,7 @@ func init() { }) data.Description[u] = desc } + fmt.Println("done") fmt.Println(string(errors.Log1(jsonx.WriteBytes(data)))) }) }