Hwaro::Models::OpenGraphConfig
OpenGraph and Twitter Card configuration
Constructors
Instance methods
Generate both OG and Twitter tags
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).
Resolve an image path to an absolute URL, falling back to default_image.
A value that already carries its own origin (any scheme: URL, or a
protocol-relative //cdn.example.com/og.png) is returned untouched:
the old starts_with?("http") test sent //cdn… down the
root-relative branch and emitted https://site.com//cdn.example.com/og.png
as og:image, while a relative path merely starting with the letters
"http" (http-guide/cover.png) was left relative — invalid for OG.
The card type for a page whose resolved image is img_url: shared by
twitter_tags and the seo.twitter_card template field.