From b29a353ce51d37efe704890eb3b8368414c71324 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 8 May 2017 15:06:18 +0200 Subject: [PATCH] adds rel canonical on main sections --- app/views/budgets/index.html.erb | 4 ++++ app/views/debates/index.html.erb | 3 +++ app/views/layouts/application.html.erb | 1 + app/views/pages/more_info/index.html.erb | 3 +++ app/views/polls/index.html.erb | 3 +++ app/views/proposals/index.html.erb | 3 +++ app/views/shared/_canonical.html.erb | 1 + 7 files changed, 18 insertions(+) create mode 100644 app/views/shared/_canonical.html.erb diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index f3e386d27..9f5ab0ab2 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -1,3 +1,7 @@ +<% content_for :canonical do %> + <%= render "shared/canonical", href: budgets_url %> +<% end %> +
diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index fd5e45059..b7796f0ba 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -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 %>

<%= t("shared.outline.debates") %>

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7f66b524e..d410140e5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,6 +7,7 @@ <%= render "layouts/tracking_data" %> <%= render "layouts/meta_tags" %> <%= content_for?(:title) ? yield(:title) : setting['org_name'] %> + <%= content_for :canonical %> <%= stylesheet_link_tag "application" %>