add config MetaImg & MetaDescr for main page

This commit is contained in:
arnaucube
2020-01-29 17:16:22 +01:00
parent c2f0df4756
commit 6d01e14a67
3 changed files with 5 additions and 0 deletions

BIN
blogo

Binary file not shown.

View File

@@ -39,6 +39,9 @@ func main() {
m := make(map[string]string)
m["[blogo-title]"] = config.Title
m["[blogo-content]"] = blogoIndex
m["[blogo-summary]"] = config.MetaDescr
m["[blogo-img]"] = config.AbsoluteUrl + "/" + config.MetaImg
m["[blogo-link]"] = config.AbsoluteUrl
r := putHTMLToTemplate(indexTemplate, m)
writeFile(outputDir+"/"+"index.html", r)

View File

@@ -16,6 +16,8 @@ type Post struct {
//Config gets the config.json file into struct
type Config struct {
Title string `json:"title"`
MetaImg string `json:"metaimg"`
MetaDescr string `json:"metadescr"`
RelativePath string `json:"relativePath"`
AbsoluteUrl string `json:"absoluteUrl"`
IndexTemplate string `json:"indexTemplate"`