Improved open graph data
This commit is contained in:
parent
7c65ea8cc6
commit
7d2136a973
@ -21,10 +21,11 @@ func Get(ctx *aero.Context) string {
|
||||
|
||||
openGraph := &arn.OpenGraph{
|
||||
Tags: map[string]string{
|
||||
"og:title": company.Name.English,
|
||||
"og:url": "https://" + ctx.App.Config.Domain + company.Link(),
|
||||
"og:site_name": "notify.moe",
|
||||
"og:type": "article",
|
||||
"og:title": company.Name.English,
|
||||
"og:description": company.Description,
|
||||
"og:url": "https://" + ctx.App.Config.Domain + company.Link(),
|
||||
"og:site_name": "notify.moe",
|
||||
"og:type": "article",
|
||||
},
|
||||
}
|
||||
|
||||
@ -32,6 +33,12 @@ func Get(ctx *aero.Context) string {
|
||||
openGraph.Tags["og:image"] = company.Image
|
||||
}
|
||||
|
||||
if company.Description != "" {
|
||||
openGraph.Tags["og:description"] = company.Description
|
||||
} else {
|
||||
openGraph.Tags["og:description"] = company.Name.English + " company information."
|
||||
}
|
||||
|
||||
ctx.Data = openGraph
|
||||
return ctx.HTML(components.CompanyPage(company, user))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user