Added summary to OG data

This commit is contained in:
Eduard Urbach 2017-07-06 20:44:47 +02:00
parent e47f1d298f
commit 0e009f434c

View File

@ -40,21 +40,22 @@ func Get(ctx *aero.Context) string {
}
// Open Graph
openGraph := map[string]string{
meta := map[string]string{
"og:title": anime.Title.Canonical,
"og:image": anime.Image.Large,
"og:url": "https://" + ctx.App.Config.Domain + anime.Link(),
"og:site_name": "notify.moe",
"description": anime.Summary,
}
switch anime.Type {
case "tv":
openGraph["og:type"] = "video.tv_show"
meta["og:type"] = "video.tv_show"
case "movie":
openGraph["og:type"] = "video.movie"
meta["og:type"] = "video.movie"
}
ctx.Data = openGraph
ctx.Data = meta
return ctx.HTML(components.Anime(anime, tracks, user, episodesReversed))
}