Skip to content

Instantly share code, notes, and snippets.

@Soldo
Created September 3, 2012 19:17
Show Gist options
  • Save Soldo/3612563 to your computer and use it in GitHub Desktop.
Save Soldo/3612563 to your computer and use it in GitHub Desktop.
<% if (controller.controller_name == "posts" && controller.action_name == "show" ) %>
<meta property="og:title" content="<%= @post.title %>" />
<meta property="og:url" content="<%= refinery.blog_post_url %>" />
<% if @post.teaser_first_img %>
<meta property="og:image" content="http://.providenca.net<%= @post.teaser_first_img %>" />
<% else %>
<meta property="og:image" content="https://s3.amazonaws.com/slasticarnica_production/staticne-slike/logo-tekst.jpg" />
<% end %>
<% if @post.teaser_p_description && @post.teaser_p_description.length > 2 %>
<meta property="og:description" content="<%= @post.teaser_p_description %>" />
<% else %>
<meta property="og:description" content="<%= @post.first_p_body_bp %>" />
<% end %>
<% else %>
<meta property="og:title" content="~my site~ torte i kolači" />
<meta property="og:description" content="Ovdje dolazi general description." />
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment