give user paths a canonical tag
This commit is contained in:
parent
033e71e9bf
commit
e6c419c7e0
4 changed files with 11 additions and 2 deletions
|
@ -29,6 +29,10 @@ module ApplicationHelper
|
||||||
content_tag(:div, html, :class => 'campaign-progress-wrapper')
|
content_tag(:div, html, :class => 'campaign-progress-wrapper')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def canonical_path(resource)
|
||||||
|
content_for :meta, tag(:link, :rel => 'canonical', :href => url_for(resource))
|
||||||
|
end
|
||||||
|
|
||||||
def flashes
|
def flashes
|
||||||
raw(flash.inject('') do |html, pair|
|
raw(flash.inject('') do |html, pair|
|
||||||
key, value = pair
|
key, value = pair
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
- else
|
- else
|
||||||
- title "#{@user.name}'s Items"
|
- title "#{@user.name}'s Items"
|
||||||
|
|
||||||
|
- canonical_path user_closet_hangers_path(@user)
|
||||||
|
|
||||||
- content_for :before_flashes do
|
- content_for :before_flashes do
|
||||||
#closet-hangers-contact
|
#closet-hangers-contact
|
||||||
- if public_perspective?
|
- if public_perspective?
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
- title 'Recent Contributions'
|
- title 'Recent Contributions'
|
||||||
|
- if @user
|
||||||
|
- canonical_path user_contributions_path(@user)
|
||||||
|
|
||||||
%ul.buttons
|
%ul.buttons
|
||||||
- if @user
|
- if @user
|
||||||
%li= link_to 'Recent Contributions', contributions_path, :class => 'button'
|
%li= link_to 'Recent Contributions', contributions_path, :class => 'button'
|
||||||
|
@ -15,3 +18,4 @@
|
||||||
= will_paginate @contributions
|
= will_paginate @contributions
|
||||||
%ul.contributions= render @contributions
|
%ul.contributions= render @contributions
|
||||||
= will_paginate @contributions
|
= will_paginate @contributions
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
- title @item.name
|
- title @item.name
|
||||||
- content_for :meta do
|
- canonical_path @item
|
||||||
%link{:rel => 'canonical', :href => url_for(@item)}
|
|
||||||
|
|
||||||
- cache "items_show_#{@item.id}_main_content" do
|
- cache "items_show_#{@item.id}_main_content" do
|
||||||
%header#item-header
|
%header#item-header
|
||||||
|
|
Loading…
Reference in a new issue