mirror of
https://github.com/arnaucube/blogo.git
synced 2026-02-07 03:46:40 +01:00
add config MetaImg & MetaDescr for main page
This commit is contained in:
3
main.go
3
main.go
@@ -39,6 +39,9 @@ func main() {
|
|||||||
m := make(map[string]string)
|
m := make(map[string]string)
|
||||||
m["[blogo-title]"] = config.Title
|
m["[blogo-title]"] = config.Title
|
||||||
m["[blogo-content]"] = blogoIndex
|
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)
|
r := putHTMLToTemplate(indexTemplate, m)
|
||||||
writeFile(outputDir+"/"+"index.html", r)
|
writeFile(outputDir+"/"+"index.html", r)
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ type Post struct {
|
|||||||
//Config gets the config.json file into struct
|
//Config gets the config.json file into struct
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
MetaImg string `json:"metaimg"`
|
||||||
|
MetaDescr string `json:"metadescr"`
|
||||||
RelativePath string `json:"relativePath"`
|
RelativePath string `json:"relativePath"`
|
||||||
AbsoluteUrl string `json:"absoluteUrl"`
|
AbsoluteUrl string `json:"absoluteUrl"`
|
||||||
IndexTemplate string `json:"indexTemplate"`
|
IndexTemplate string `json:"indexTemplate"`
|
||||||
|
|||||||
Reference in New Issue
Block a user