# HG changeset patch # User zaitsev.serge # Date 1440943265 0 # Node ID dd669a7e582f906a9a4658b3b6892a04a326bcae # Parent 5ee89d094279ec4c1fae3c7471a5c929f827fab1 file, url and output should not be overridden by globals diff -r 5ee89d094279 -r dd669a7e582f zs.go --- a/zs.go Sun Aug 30 13:50:03 2015 +0000 +++ b/zs.go Sun Aug 30 14:01:05 2015 +0000 @@ -35,22 +35,22 @@ s := string(b) url := path[:len(path)-len(filepath.Ext(path))] + ".html" v := Vars{ - "file": path, - "url": url, "title": "", "description": "", "keywords": "", - "output": filepath.Join(PUBDIR, url), + } + for name, value := range globals { + v[name] = value } if _, err := os.Stat(filepath.Join(ZSDIR, "layout.amber")); err == nil { v["layout"] = "layout.amber" } else { v["layout"] = "layout.html" } + v["file"] = path + v["url"] = url + v["output"] = filepath.Join(PUBDIR, url) - for name, value := range globals { - v[name] = value - } if strings.Index(s, "\n\n") == -1 { return v, s, nil }