Skip to content

Instantly share code, notes, and snippets.

@Soldo
Created October 14, 2012 17:35
Show Gist options
  • Save Soldo/3889278 to your computer and use it in GitHub Desktop.
Save Soldo/3889278 to your computer and use it in GitHub Desktop.
(in head section)
<% if @page.title == "Blog" %>
<%= render '/facebook/fb_og_meta_tags' %>
<% else %>
<%= render '/facebook/initial_like' %>
<% end %>
(fb_og_meta_tags.html.erb)
<meta property="og:type" content="food" />
<meta property="og:site_name" content="http://www.providenca.net" />
<meta property="fb:admins" content="1234565432" />
<% 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="~Providenca~ torte i kolači" />
<meta property="og:description" content="Ovdje dolazi general description." />
<% end %>
(initial_like.html.erb)
<meta property="og:title" content="~Providenca~ torte i kola&#x10d;i" />
<meta property="og:type" content="food" />
<meta property="og:url" content="http://providenca.net" />
<meta property="og:image" content="https://s3.amazonaws.com/slasticarnica_production/staticne-slike/new-logo.png" />
<meta property="og:site_name" content="~Providenca~ torte i kola&#x10d;i" />
<meta property="fb:admins" content="123432433322" />
<meta property="og:description" content="U životu imate razne događaje koje mozete uljepšati slatkim poklonom - od vjenčanja, rođendana, proslave diplomskog, tuluma, godisnjice braka, blagdana ili zbog vlastitog užitka. Slatki zalogajčić torti i kolača ~Providenca~ pripremljenih na domaći način koji se temelji na receptima bakine kuhinje ugodno će iznenaditi Vaše najdraže.
Pogledajte našu raznoliku i bogatu ponudu proizvoda i zasladite svoj život." />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment