9 "go.stargrave.org/godlighty"
10 "go.stargrave.org/godlighty/rc"
14 host := "blog.stargrave.org"
15 godlighty.Hosts[host] = &godlighty.HostCfg{
16 Root: path.Join(WWW, host),
18 Hooks: []godlighty.Hook{
19 func(w http.ResponseWriter, r *http.Request) bool {
21 if strings.HasPrefix(r.URL.Path, "/russian") {
23 } else if strings.HasPrefix(r.URL.Path, "/english") {
25 } else if strings.HasPrefix(r.URL.Path, "/example") {
31 r.URL.Path = strings.TrimPrefix(r.URL.Path, "/"+t)
32 rc.RunCGIAndLog(host, w, r, &cgi.Handler{
33 Path: "/home/sgblog/sgblog",
35 Env: []string{"SGBLOG_CFG=/home/sgblog/" + t + ".hjson"},