added links relative path
arnaucode arnaucode@gmail.com
Sat, 30 Dec 2017 09:00:32 +0100
3 files changed,
2 insertions(+),
1 deletions(-)
M
main.go
→
main.go
@@ -27,7 +27,7 @@ m := make(map[string]string)
m["[blogo-index-post-template]"] = htmlpostthumb r := putHTMLToTemplate(indexPostTemplate, m) filename := strings.Split(post.Md, ".")[0] - r = "<a href='" + filename + ".html'>" + r + "</a>" + r = "<a href='" + config.RelativePath + "/" + filename + ".html'>" + r + "</a>" blogoIndex = blogoIndex + r } //put the blogoIndex in the index.html
M
readConfig.go
→
readConfig.go
@@ -14,6 +14,7 @@
//Config gets the config.json file into struct type Config struct { Title string `json:"title"` + RelativePath string `json:"relativePath"` IndexTemplate string `json:"indexTemplate"` PostThumbTemplate string `json:"postThumbTemplate"` Posts []Post `json:"posts"`