mirror of
https://github.com/arnaucube/blogo.git
synced 2026-02-06 19:36:39 +01:00
added links relative path
This commit is contained in:
2
main.go
2
main.go
@@ -27,7 +27,7 @@ func main() {
|
||||
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
|
||||
|
||||
@@ -14,6 +14,7 @@ type Post struct {
|
||||
//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"`
|
||||
|
||||
Reference in New Issue
Block a user