Fix bug.
This commit is contained in:
parent
9cb912be75
commit
b9d900f9d7
|
@ -21,7 +21,7 @@ class PageContentsController < OrbitAdminController
|
|||
img_srcs = doc.css('img').map{ |i| i['src'] }
|
||||
metas = [{"property" => "og:title", "content" => name},{"property" => "og:site_name", "content" => Site.first.title},{"property" => "og:url", "content" => request.original_url},{"property" => "og:description", "content" => meta_desc},{"property" => "og:type", "content" => "Article"}]
|
||||
if img_srcs.count > 0
|
||||
metas << {"property" => "og:image", "content" => URI.join(request.base_url, img_srcs[0])}
|
||||
metas << {"property" => "og:image", "content" => URI.join(request.base_url, img_srcs[0]).to_s}
|
||||
end
|
||||
OrbitHelper.render_meta_tags(metas)
|
||||
|
||||
|
|
Loading…
Reference in New Issue