canonical tag for posts
This commit is contained in:
parent
97ad55cbf0
commit
20cffcee84
1 changed files with 19 additions and 15 deletions
|
@ -18,6 +18,7 @@ module Blog
|
|||
|
||||
def show
|
||||
@blog_comment = BlogComment.new
|
||||
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
|
||||
|
||||
respond_with (@blog_post) do |format|
|
||||
format.html { present(@blog_post) }
|
||||
|
@ -101,5 +102,8 @@ module Blog
|
|||
@tags = BlogPost.tag_counts_on(:tags)
|
||||
end
|
||||
|
||||
def canonical?
|
||||
::Refinery.i18n_enabled? && ::Refinery::I18n.default_frontend_locale != ::Refinery::I18n.current_frontend_locale
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue