]> git.openstreetmap.org Git - rails.git/commitdiff
Add og:url to OpenGraph tags
authorTom Hughes <tom@compton.nu>
Tue, 27 Oct 2015 11:52:40 +0000 (11:52 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 27 Oct 2015 12:01:58 +0000 (12:01 +0000)
app/helpers/open_graph_helper.rb

index 61c3dc44bc77bf38c7f541f3320245cf6402dca9..cb72d7254cdf7c7db7aced287179b980fba23094 100644 (file)
@@ -5,7 +5,8 @@ module OpenGraphHelper
       "og:title" => [t("layouts.project_name.title"), title].compact.join(" | "),
       "og:type" => "website",
       "og:image" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "http"),
-      "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https")
+      "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https"),
+      "og:url" => url_for(:host => SERVER_URL)
     }
 
     tags.map do |property, content|