<% content_for :html_header do %>
  <%# Facebook Open Graph
    # Reference: https://developers.facebook.com/docs/opengraphprotocol/
  %>
  <%= tag :meta, :property => "og:title", :content => html_title %>
  <%= tag :meta, :property => "og:url", :content => url %>
  <% if defined? description %>
    <%= tag :meta, property: "og:description", content: description %>
  <% else %>
    <%= tag :meta, :property => "og:description", :content => html_title %>
  <% end %>
  <% if posts.any? %>
    <%= tag :meta, :name => "og:image", :content => with_host(posts[0].rating == "e" ? image_path("stubs/explicit.png") : posts[0].sample_url) %>
  <% else %>
    <%= tag :meta, :name => "og:image", :content => with_host(image_path("blank.gif")) %>
  <% end %>

  <%# Twitter Card
    # Other attributes are fulfilled by Open Graph.
    # Reference: https://dev.twitter.com/docs/cards
  %>
  <%= tag :meta, name: "twitter:card", :content => "summary_large_image" %>
  <% if CONFIG['twitter_id'] %>
    <%= tag :meta, name: "twitter:site", :content => "@#{CONFIG["twitter_id"]}" %>
  <% end %>
<% end %>
