Put category description in meta description tag

This commit is contained in:
Neil Lalonde 2013-09-09 11:38:09 -04:00
parent 98267d439a
commit b73f4e9864
2 changed files with 2 additions and 1 deletions

View File

@ -74,6 +74,7 @@ class ListController < ApplicationController
end end
guardian.ensure_can_see!(@category) guardian.ensure_can_see!(@category)
list = query.list_category(@category) list = query.list_category(@category)
@description = @category.description
end end
list.more_topics_url = url_for(category_list_path(params[:category], page: next_page, format: "json")) list.more_topics_url = url_for(category_list_path(params[:category], page: next_page, format: "json"))

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title> <title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="description"> <meta content="<%= @description %>" name="description">
<meta content="" name="author"> <meta content="" name="author">
<%= canonical_link_tag %> <%= canonical_link_tag %>