mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:28:11 +08:00
Revert "FIX: paginated category and topic pages should not have canonical tag"
This reverts commit ecd93f7efb
.
This commit is contained in:
parent
4986314122
commit
0f7aaf5ab1
|
@ -84,7 +84,7 @@ class ListController < ApplicationController
|
|||
end
|
||||
|
||||
define_method("category_#{filter}") do
|
||||
canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present?
|
||||
canonical_url "#{Discourse.base_url}#{@category.url}"
|
||||
self.send(filter, category: @category.id)
|
||||
end
|
||||
|
||||
|
@ -93,7 +93,7 @@ class ListController < ApplicationController
|
|||
end
|
||||
|
||||
define_method("parent_category_category_#{filter}") do
|
||||
canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present?
|
||||
canonical_url "#{Discourse.base_url}#{@category.url}"
|
||||
self.send(filter, category: @category.id)
|
||||
end
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class TopicsController < ApplicationController
|
|||
response.headers['X-Robots-Tag'] = 'noindex'
|
||||
end
|
||||
|
||||
canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}") unless params[:page].present?
|
||||
canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}")
|
||||
|
||||
perform_show_response
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user