2 require "addressable/uri"
4 def opengraph_tags(title = nil, og_image = nil)
6 "og:site_name" => t("layouts.project_name.title"),
7 "og:title" => title || t("layouts.project_name.title"),
8 "og:type" => "website",
9 "og:image" => og_image ? Addressable::URI.join(root_url, og_image).normalize : image_url("osm_logo_256.png"),
10 "og:url" => url_for(:only_path => false),
11 "og:description" => t("layouts.intro_text")
14 safe_join(tags.map do |property, content|
15 tag.meta(:property => property, :content => content)