92 lines
2.7 KiB
Go
92 lines
2.7 KiB
Go
package article
|
|
|
|
const (
|
|
SEOSourceSEOTitle = "seo_title"
|
|
SEOSourceTitle = "title"
|
|
SEOSourceSEODescription = "seo_description"
|
|
SEOSourceExcerpt = "excerpt"
|
|
SEOSourceBody = "body"
|
|
SEOSourceSite = "site"
|
|
SEOSourceNone = "none"
|
|
SEOSourceSocial = "social"
|
|
SEOSourceCover = "cover"
|
|
SEOSourceCanonicalURL = "canonical_url"
|
|
)
|
|
|
|
type SEOOpenGraph struct {
|
|
Type string `json:"type"`
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Image string `json:"image"`
|
|
ImageAlt string `json:"image_alt"`
|
|
URL string `json:"url"`
|
|
SiteName string `json:"site_name"`
|
|
Locale string `json:"locale"`
|
|
}
|
|
|
|
type SEOTwitter struct {
|
|
Card string `json:"card"`
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Image string `json:"image"`
|
|
ImageAlt string `json:"image_alt"`
|
|
}
|
|
|
|
type SEOImage struct {
|
|
URL string `json:"url"`
|
|
Alt string `json:"alt"`
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
type SEOAuthor struct {
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
SameAs []string `json:"same_as"`
|
|
}
|
|
|
|
type SEOFallbacks struct {
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Image string `json:"image"`
|
|
Canonical string `json:"canonical"`
|
|
}
|
|
|
|
type SEOJSONLDPerson struct {
|
|
Type string `json:"@type"`
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
SameAs []string `json:"sameAs"`
|
|
}
|
|
|
|
type SEOJSONLDPage struct {
|
|
Type string `json:"@type"`
|
|
ID string `json:"@id"`
|
|
}
|
|
|
|
type SEOJSONLD struct {
|
|
Context string `json:"@context"`
|
|
Type string `json:"@type"`
|
|
Headline string `json:"headline"`
|
|
Description string `json:"description,omitempty"`
|
|
Image []string `json:"image,omitempty"`
|
|
Author []SEOJSONLDPerson `json:"author,omitempty"`
|
|
DatePublished string `json:"datePublished,omitempty"`
|
|
DateModified string `json:"dateModified"`
|
|
MainEntityOfPage SEOJSONLDPage `json:"mainEntityOfPage"`
|
|
}
|
|
|
|
type ResolvedSEO struct {
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
CanonicalURL string `json:"canonical_url"`
|
|
Robots string `json:"robots"`
|
|
OG SEOOpenGraph `json:"og"`
|
|
Twitter SEOTwitter `json:"twitter"`
|
|
Image SEOImage `json:"image"`
|
|
Authors []SEOAuthor `json:"authors"`
|
|
PublishedAt *string `json:"published_at"`
|
|
ModifiedAt string `json:"modified_at"`
|
|
Fallbacks SEOFallbacks `json:"fallbacks"`
|
|
JSONLD SEOJSONLD `json:"json_ld"`
|
|
}
|