<% if @podcast && @podcast.persisted? %>
  <% title @podcast.title %>

  <%= content_for :page_meta do %>
    <link rel="canonical" href="<%= app_url(@podcast.slug) %>" />
    <meta name="description" content="<%= @podcast.description %>">
    <meta name="keywords" content="software development,engineering,rails,javascript,ruby">

    <meta property="og:type" content="article" />
    <meta property="og:url" content="<%= app_url(@podcast.slug) %>" />
    <meta property="og:title" content="<%= @podcast.title %>" />
    <meta property="og:image" content="https://res.cloudinary.com/practicaldev/image/fetch/c_scale,h_300,w_300,r_max/u_listennow_kjml1x,y_45/<%= cloudinary(@podcast.image_url, 300) %>">

    <meta property="og:description" content="<%= @podcast.description %>" />
    <meta property="og:site_name" content="<%= community_qualified_name %>" />

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
    <meta name="twitter:creator" content="@<%= @podcast.twitter_username %>">
    <meta name="twitter:title" content="<%= @podcast.title %>">
    <meta name="twitter:description" content="<%= @podcast.description %>" />
    <meta name="twitter:image:src" content="https://res.cloudinary.com/practicaldev/image/fetch/c_scale,h_300,w_300,r_max/u_listennow_kjml1x,y_45/<%= cloudinary(@podcast.image_url, 300) %>">
  <% end %>
<% else %>
  <% title "Podcasts" %>
  <%= content_for :page_meta do %>
    <link rel="canonical" href="<%= app_url(pod_path) %>" />
    <meta name="description" content="Discover technical podcasts for developers">
    <meta name="keywords" content="software development,engineering,rails,javascript,ruby">

    <meta property="og:type" content="article" />
    <meta property="og:url" content="<%= app_url(pod_path) %>" />
    <meta property="og:title" content="Podcasts on <%= community_qualified_name %>" />
    <meta property="og:image" content="http://i.imgur.com/e5tJ9L9.png">

    <meta property="og:description" content="Discover technical podcasts for developers" />
    <meta property="og:site_name" content="<%= community_qualified_name %>" />

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
    <meta name="twitter:creator" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
    <meta name="twitter:title" content="Podcasts on <%= community_qualified_name %>">
    <meta name="twitter:description" content="Discover technical podcasts for developers" />
    <meta name="twitter:image:src" content="http://i.imgur.com/e5tJ9L9.png">
  <% end %>
<% end %>
