Hwaro::Models::OpenGraphConfig
Inherits Reference / Object
OpenGraph and Twitter Card configuration
Constructors
new
SourceInstance methods
all_tags(title : String, description : String | Nil, url : String, image : String | Nil, base_url : String, og_type_override : String | Nil = nil) : String
Generate both OG and Twitter tags
auto_image
Sourceauto_image=(auto_image : AutoImageConfig)
Sourcedefault_image
Sourcedefault_image=(default_image : String | Nil)
Sourcefb_app_id
Sourcefb_app_id=(fb_app_id : String | Nil)
Sourceog_tags(title : String, description : String | Nil, url : String, image : String | Nil, base_url : String, og_type_override : String | Nil = nil) : String
Generate OG meta tags.
og_type_override lets the renderer force og:type="website" for
the homepage, section indexes, taxonomy listings, and the 404
page — the configured @og_type ("article" by default) only fits
content pages. See render.cr's og_type_for helper (gh#522).
og_type
Sourceog_type=(og_type : String)
Sourceresolve_image_url(image : String | Nil, base_url : String) : String | Nil
Resolve an image path to an absolute URL, falling back to default_image
twitter_card
Sourcetwitter_card=(twitter_card : String)
Sourcetwitter_creator
Sourcetwitter_creator=(twitter_creator : String | Nil)
Sourcetwitter_site
Sourcetwitter_site=(twitter_site : String | Nil)
Sourcetwitter_tags(title : String, description : String | Nil, image : String | Nil, base_url : String) : String
Generate Twitter Card meta tags