mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add site setting site_description. If filled, it will be used in meta description tag for teh white hat SEO
This commit is contained in:
parent
06ea8140aa
commit
4fa11f159f
4 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,8 @@ class CategoriesController < ApplicationController
|
||||||
skip_before_filter :check_xhr, only: [:index]
|
skip_before_filter :check_xhr, only: [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@description = SiteSetting.site_description
|
||||||
|
|
||||||
@list = CategoryList.new(guardian)
|
@list = CategoryList.new(guardian)
|
||||||
|
|
||||||
@list.draft_key = Draft::NEW_TOPIC
|
@list.draft_key = Draft::NEW_TOPIC
|
||||||
|
|
|
@ -11,6 +11,7 @@ class ListController < ApplicationController
|
||||||
user = list_target_user
|
user = list_target_user
|
||||||
list = TopicQuery.new(user, list_opts).public_send("list_#{filter}")
|
list = TopicQuery.new(user, list_opts).public_send("list_#{filter}")
|
||||||
list.more_topics_url = url_for(self.public_send "#{filter}_path".to_sym, list_opts.merge(format: 'json', page: next_page))
|
list.more_topics_url = url_for(self.public_send "#{filter}_path".to_sym, list_opts.merge(format: 'json', page: next_page))
|
||||||
|
@description = SiteSetting.site_description if [:latest, :hot].include?(filter)
|
||||||
|
|
||||||
respond(list)
|
respond(list)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ class SiteSetting < ActiveRecord::Base
|
||||||
|
|
||||||
# settings available in javascript under Discourse.SiteSettings
|
# settings available in javascript under Discourse.SiteSettings
|
||||||
client_setting(:title, "Discourse")
|
client_setting(:title, "Discourse")
|
||||||
|
setting(:site_description, '')
|
||||||
client_setting(:logo_url, '/assets/d-logo-sketch.png')
|
client_setting(:logo_url, '/assets/d-logo-sketch.png')
|
||||||
client_setting(:logo_small_url, '/assets/d-logo-sketch-small.png')
|
client_setting(:logo_small_url, '/assets/d-logo-sketch-small.png')
|
||||||
setting(:contact_email, '')
|
setting(:contact_email, '')
|
||||||
|
|
|
@ -459,6 +459,7 @@ en:
|
||||||
discourse_org_access_key: "The access key used to access the Discourse Hub nickname registry at discourse.org"
|
discourse_org_access_key: "The access key used to access the Discourse Hub nickname registry at discourse.org"
|
||||||
educate_until_posts: "Show pop-up composer education panel until the user has made this many posts"
|
educate_until_posts: "Show pop-up composer education panel until the user has made this many posts"
|
||||||
title: "Title of this site, will be used in the title tag and elsewhere"
|
title: "Title of this site, will be used in the title tag and elsewhere"
|
||||||
|
site_description: "Describe this forum in one sentence. This description will be used in the meta description tag."
|
||||||
contact_email: "The email address of someone who can be contacted about the site. Important notices from Discourse.org regarding critical updates may be sent to this address."
|
contact_email: "The email address of someone who can be contacted about the site. Important notices from Discourse.org regarding critical updates may be sent to this address."
|
||||||
company_full_name: "The full name of the company that runs this site, used in legal documents like the /tos"
|
company_full_name: "The full name of the company that runs this site, used in legal documents like the /tos"
|
||||||
company_short_name: "The short name of the company that runs this site, used in legal documents like the /tos"
|
company_short_name: "The short name of the company that runs this site, used in legal documents like the /tos"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue