adds rel canonical on main sections

This commit is contained in:
Alberto Garcia Cabeza
2017-05-08 15:06:18 +02:00
parent 37a403adc5
commit b29a353ce5
7 changed files with 18 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
<% content_for :canonical do %>
<%= render "shared/canonical", href: budgets_url %>
<% end %>
<div class="expanded budget no-margin-top padding">
<div class="row">
<div class="small-12 column">

View File

@@ -4,6 +4,9 @@
search_path: debates_path(page: 1),
i18n_namespace: "debates.index.search_form" %>
<% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: debates_url %>
<% end %>
<main>
<h1 class="sr-only"><%= t("shared.outline.debates") %></h1>

View File

@@ -7,6 +7,7 @@
<%= render "layouts/tracking_data" %>
<%= render "layouts/meta_tags" %>
<title><%= content_for?(:title) ? yield(:title) : setting['org_name'] %></title>
<%= content_for :canonical %>
<%= stylesheet_link_tag "application" %>
<!--[if lt IE 9]>
<%= stylesheet_link_tag "ie" %>

View File

@@ -1,4 +1,7 @@
<% provide :title do %><%= t("pages.titles.more_info", org_name: setting['org_name']) %><% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: more_info_url %>
<% end %>
<div class="jumbo light">
<div class="row">

View File

@@ -1,5 +1,8 @@
<% provide :title do %><%= t("polls.index.title") %><% end %>
<% content_for :wrapper_class, "light" %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: polls_url %>
<% end %>
<div class="expanded no-margin-top dark-heading">
<div class="row">

View File

@@ -4,6 +4,9 @@
search_path: proposals_path(page: 1),
i18n_namespace: "proposals.index.search_form" %>
<% end %>
<% content_for :canonical do %>
<%= render "shared/canonical", href: proposals_url %>
<% end %>
<main>
<h1 class="sr-only"><%= t("shared.outline.proposals") %></h1>

View File

@@ -0,0 +1 @@
<link rel="canonical" href="<%= href %>">