FIX: show category name in title for crawler view

Show category name in title for crawler view despite presence of `short_site_description`.

Bug reported here: https://meta.discourse.org/t/short-site-description-break-category-title-for-crawler-or-its-the-expected-behavior/122109/
This commit is contained in:
Arpit Jalan
2019-07-08 11:42:39 +05:30
parent 3132a9007b
commit 2cd4e95d82
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ class ListController < ApplicationController
@title = I18n.t('js.filters.with_topics', filter: filter_title)
end
@title << " - #{SiteSetting.title}"
elsif (filter.to_s == current_homepage) && SiteSetting.short_site_description.present?
elsif @category.blank? && (filter.to_s == current_homepage) && SiteSetting.short_site_description.present?
@title = "#{SiteSetting.title} - #{SiteSetting.short_site_description}"
end
end