fix og tags for just text
This commit is contained in:
parent
21fef13620
commit
35b0f7637b
1 changed files with 1 additions and 2 deletions
|
|
@ -12,8 +12,7 @@ module OpenGraphHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def og_image(post)
|
def og_image(post)
|
||||||
tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_large))}
|
tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_large))} || []
|
||||||
tags << meta_tag_with_property('og:image', "#{root_url.chop}#{image_path('asterisk.png')}") if tags.empty?
|
|
||||||
tags.join(' ')
|
tags.join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue