<div class="meta-data group">
  <% if publication.updated_at %>
    <p class="modified-date"><%= t 'common.last_updated' %>: <%= l publication.updated_at, :format => '%e %B %Y' %></p>
  <% end %>
</div>

<% if api_links.any? %>
<% content_for :extra_headers do %>
  <% api_links.each do |type, href| %>
<link rel="alternate" type="<%= type %>" href="<%= href %>">
  <% end %>
<% end %>
<% end %>

<% content_for :extra_headers do %>
  <% if !publication.description.nil? && !publication.description.empty? %>
<meta name="description" content="<%= publication.description %>" />
  <% elsif !publication.short_description.nil? && !publication.short_description.empty? %>
<meta name="description" content="<%= publication.short_description %>" />
  <% end %>
<% end %>

<div class="meta-data group">
  <% if publication.updated_at %>
    <p class="modified-date"><%= t 'common.last_updated' %>: <%= l publication.updated_at, :format => '%e %B %Y' %></p>
  <% end %>
</div>

<% if api_links.any? %>
<% content_for :extra_headers do %>
  <% api_links.each do |type, href| %>
<link rel="alternate" type="<%= type %>" href="<%= href %>">
  <% end %>
<% end %>
<% end %>

<% content_for :extra_headers do %>
  <% if publication.description.present? %>
<meta name="description" content="<%= publication.description %>" />
  <% elsif publication.short_description.present? %>
<meta name="description" content="<%= publication.short_description %>" />
  <% end %>
<% end %>

Use `present?` instead of multiple method calls
Use `present?` instead of multiple method calls