mirror of
https://git.mills.io/prologic/zs.git
synced 2024-11-17 17:56:11 -05:00
removed default date value, added some default title/description/keywords for markdown
This commit is contained in:
parent
37c0ffcf94
commit
70ba7396ff
6
zs.go
6
zs.go
@ -37,6 +37,9 @@ func md(path string, globals Vars) (Vars, string, error) {
|
|||||||
v := Vars{
|
v := Vars{
|
||||||
"file": path,
|
"file": path,
|
||||||
"url": url,
|
"url": url,
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"keywords": "",
|
||||||
"output": filepath.Join(PUBDIR, url),
|
"output": filepath.Join(PUBDIR, url),
|
||||||
}
|
}
|
||||||
if _, err := os.Stat(filepath.Join(ZSDIR, "layout.amber")); err == nil {
|
if _, err := os.Stat(filepath.Join(ZSDIR, "layout.amber")); err == nil {
|
||||||
@ -45,9 +48,6 @@ func md(path string, globals Vars) (Vars, string, error) {
|
|||||||
v["layout"] = "layout.html"
|
v["layout"] = "layout.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
if info, err := os.Stat(path); err == nil {
|
|
||||||
v["date"] = info.ModTime().Format("02-01-2006")
|
|
||||||
}
|
|
||||||
for name, value := range globals {
|
for name, value := range globals {
|
||||||
v[name] = value
|
v[name] = value
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user