22 lines
531 B
Go
Raw Normal View History

package thread
import (
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
2019-06-01 04:55:49 +00:00
"github.com/animenotifier/notify.moe/assets"
"github.com/animenotifier/notify.moe/utils"
)
2019-06-05 07:18:04 +00:00
func getOpenGraph(thread *arn.Thread) *arn.OpenGraph {
openGraph := &arn.OpenGraph{
Tags: map[string]string{
"og:title": thread.Title,
"og:description": utils.CutLongDescription(thread.Text),
2019-06-01 04:55:49 +00:00
"og:url": "https://" + assets.Domain + thread.Link(),
"og:site_name": assets.Domain,
"og:type": "article",
},
}
return openGraph
}