arnaucube
arnaucube/blogoPublic Self-hosted repository
add config MetaImg & MetaDescr for main page
arnaucube root@arnaucube.com
Wed, 29 Jan 2020 17:16:22 +0100
commit

6d01e14a677ef478414cd08ed3ce0c64348d960f

parent

c2f0df4756e5565f649a6ddea7c98f4eca9b37bc

3 files changed, 5 insertions(+), 0 deletions(-)

jump to
M main.go → main.go

@@ -39,6 +39,9 @@ //put the blogoIndex in the index.html

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)
M readConfig.go → readConfig.go

@@ -16,6 +16,8 @@

//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"`