Mercurial > yakumo_izuru > aya
changeset 29:dd669a7e582f draft
file, url and output should not be overridden by globals
author | zaitsev.serge |
---|---|
date | Sun, 30 Aug 2015 14:01:05 +0000 |
parents | 5ee89d094279 |
children | 526ba3c717ba |
files | zs.go |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 }