<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title><%= content_for(:title) || 'Picture' %></title>

    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body class="<%= content_for(:page) %>">
    <% unless content_for(:page) == 'lightbox' %>
      <%= render partial: 'layouts/navbar' %>
    <% end %>

    <div class="container <%= content_for(:page) == 'lightbox' ? '' : 'mb-3' %>">
      <% if alert %>
        <div class="alert alert-danger" role="alert"><%= alert %></div>
      <% end %>
      <% if notice %>
        <div class="alert alert-success" role="alert"><%= notice %></div>
      <% end %>

      <%= yield %>
    </div>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title><%= content_for(:title) || 'Picture' %></title>

    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

    <link rel="canonical" href="<%= url_for(only_path: false) %>" />
  </head>

  <body class="<%= content_for(:page) %>">
    <% unless content_for(:page) == 'lightbox' %>
      <%= render partial: 'layouts/navbar' %>
    <% end %>

    <div class="container <%= content_for(:page) == 'lightbox' ? '' : 'mb-3' %>">
      <% if alert %>
        <div class="alert alert-danger" role="alert"><%= alert %></div>
      <% end %>
      <% if notice %>
        <div class="alert alert-success" role="alert"><%= notice %></div>
      <% end %>

      <%= yield %>
    </div>
  </body>
</html>

Add canonical link to layout
Add canonical link to layout
