feat(template): added {{file}} override to render template
This commit is contained in:
parent
b4c114f713
commit
ce38f24c86
1 changed files with 1 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ func RenderTemplate(templatePath string, title string, slug string) ([]byte, err
|
||||||
"{{title}}", title,
|
"{{title}}", title,
|
||||||
"{{date}}", time.Now().Format("2006-01-02"),
|
"{{date}}", time.Now().Format("2006-01-02"),
|
||||||
"{{slug}}", slug,
|
"{{slug}}", slug,
|
||||||
|
"{{file}}", slug+".md",
|
||||||
)
|
)
|
||||||
|
|
||||||
return []byte(r.Replace(string(template))), nil
|
return []byte(r.Replace(string(template))), nil
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue