<% title_with_timeframe(
     page_title: @tag.capitalize,
     timeframe: params[:timeframe],
     content_for: true,
   ) %>

<link rel="canonical" href="<%= tag_url(@tag_model, @page) %>" />
<meta name="description" content="<%= @tag %> content on <%= community_name %>">
<meta name="keywords" content="software development,engineering,<%= @tag %>">

<meta property="og:type" content="website" />
<meta property="og:url" content="<%= tag_url(@tag_model, @page) %>" />
<meta property="og:title" content="<%= title_with_timeframe(page_title: @tag.capitalize, timeframe: params[:timeframe]) %>" />
<meta property="og:description" content="<%= @tag.capitalize %> content on <%= community_name %>" />
<meta property="og:site_name" content="<%= community_qualified_name %>" />

<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
<meta name="twitter:creator" content="@<%= @tag.capitalize %>">
<meta name="twitter:title" content="<%= title_with_timeframe(page_title: @tag.capitalize, timeframe: params[:timeframe]) %>">
<meta name="twitter:description" content="<%= @tag.capitalize %> content on <%= community_name %>">

<% if @tag_model %>
  <meta name="twitter:card" content="summary_large_image">
  <meta property="og:image" content="<%= tag_social_preview_url(@tag_model, format: :png) %>">
  <meta name="twitter:image:src" content="<%= tag_social_preview_url(@tag_model, format: :png) %>">
<% else %>
  <meta property="og:image" content="<%= SiteConfig.main_social_image %>">
  <meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">
  <meta name="twitter:card" content="summary_large_image">
<% end %>
