X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5f4ae358140bbfce2c5648a556aeb7a55f89536e..5bb23f6f5f8fed81f1166a15344e44afa7fbb480:/app/helpers/open_graph_helper.rb?ds=sidebyside diff --git a/app/helpers/open_graph_helper.rb b/app/helpers/open_graph_helper.rb index b3f0ab928..a496268e4 100644 --- a/app/helpers/open_graph_helper.rb +++ b/app/helpers/open_graph_helper.rb @@ -4,12 +4,14 @@ module OpenGraphHelper def opengraph_tags(title, properties) tags = { "og:site_name" => t("layouts.project_name.title"), - "og:title" => title || t("layouts.project_name.title"), + "og:title" => properties["og:title"] || title || t("layouts.project_name.title"), "og:type" => "website", "og:url" => url_for(:only_path => false), "og:description" => properties["og:description"] || t("layouts.intro_text") }.merge( opengraph_image_properties(properties) + ).merge( + properties.slice("article:published_time") ) safe_join(tags.map do |property, content|