Update 'app/controllers/page_contents_controller.rb'
Update to remove image from ogtag
This commit is contained in:
parent
acfd3b7fce
commit
93272f9eaf
|
@ -20,9 +20,9 @@ class PageContentsController < OrbitAdminController
|
|||
doc = Nokogiri::HTML( html )
|
||||
img_srcs = doc.css('img').map{ |i| i['src'] }.compact
|
||||
metas = [{"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, URI.encode(img_srcs[0])).to_s}
|
||||
end
|
||||
# if img_srcs.count > 0
|
||||
# metas << {"property" => "og:image", "content" => URI.join(request.base_url, URI.encode(img_srcs[0])).to_s}
|
||||
# end
|
||||
OrbitHelper.render_meta_tags(metas)
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue