From 77847f0d464eec8d669a6d519992ec39f470e86e Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 28 Jul 2016 11:49:14 -0400 Subject: [PATCH] FIX: meta description tags for tags --- app/controllers/tags_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index cb79ad13a3c..2b9b45e0af6 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -24,6 +24,9 @@ class TagsController < ::ApplicationController tag_counts = self.class.tags_by_count(guardian, limit: 300).count @tags = self.class.tag_counts_json(tag_counts) + @description_meta = I18n.t("tags.title") + @title = @description_meta + respond_to do |format| format.html do render :index @@ -63,6 +66,8 @@ class TagsController < ::ApplicationController @list.more_topics_url = construct_url_with(:next, list_opts) @list.prev_topics_url = construct_url_with(:prev, list_opts) @rss = "tag" + @description_meta = I18n.t("rss_by_tag", tag: @tag_id) + @title = @description_meta canonical_url "#{Discourse.base_url_no_prefix}#{public_send(url_method(params.slice(:category, :parent_category)))}"