diff --git a/core/chat/pod.go b/core/chat/pod.go index 7521ba0c..b2981ac8 100644 --- a/core/chat/pod.go +++ b/core/chat/pod.go @@ -25,7 +25,9 @@ func init() { return // ่Š‚็‚นๅˆ—่กจ } if len(arg) == 1 { - if s := m.Cmdx(web.SPACE, arg[0], nfs.CAT, "/page/index.html"); s != "" { + if s := m.Cmdx(web.SPACE, arg[0], "web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" { + m.RenderResult(s) + } else if s := m.Cmdx(web.SPACE, arg[0], nfs.CAT, "/page/index.html"); s != "" { m.RenderResult(s) } else { m.RenderIndex(web.SERVE, ice.VOLCANOS) diff --git a/core/chat/website.go b/core/chat/website.go index 6c276754..171053e9 100644 --- a/core/chat/website.go +++ b/core/chat/website.go @@ -36,7 +36,9 @@ func _website_parse(m *ice.Message, text string, args ...string) (map[string]int ), kit.Dict(), kit.Dict() prefix := "" + m.Debug("what %v", prefix) m.Cmd(lex.SPLIT, "", mdb.KEY, mdb.NAME, func(deep int, ls []string, meta map[string]interface{}) []string { + m.Debug("what %v", ls) data := kit.Dict() switch display := ice.DisplayRequire(1, ls[0])[ctx.DISPLAY]; kit.Ext(ls[0]) { case nfs.JS: diff --git a/core/code/binpack.go b/core/code/binpack.go index 5ffd2de9..427af063 100644 --- a/core/code/binpack.go +++ b/core/code/binpack.go @@ -71,7 +71,7 @@ func init() { ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { ice.Dump = func(w io.Writer, name string, cb func(string)) bool { for _, key := range []string{name, strings.TrimPrefix(name, ice.USR_VOLCANOS)} { - if key == "/page/index.html" && kit.FileExists("src/website/index.iml") { + if key == "/page/index.html" && (kit.FileExists("src/website/index.iml") || len(ice.Info.Pack["src/website/index.iml"]) > 0) { if s := m.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" { fmt.Fprint(w, s) return true @@ -91,7 +91,7 @@ func init() { if kit.FileExists(path.Join(ice.USR_VOLCANOS, ice.PROTO_JS)) { m.Cmd(BINPACK, mdb.REMOVE) } - if kit.FileExists("src/website/index.iml") { + if kit.FileExists("src/website/index.iml") || len(ice.Info.Pack["src/website/index.iml"]) > 0 { if s := m.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" { ice.Info.Pack["/page/index.html"] = []byte(s) }