mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FEATURE: add short site description on login page title
This commit is contained in:
parent
f92a6f7ac5
commit
815edf6f4d
@ -43,7 +43,8 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
||||
_collectTitleTokens(tokens) {
|
||||
tokens.push(this.siteTitle);
|
||||
if (
|
||||
window.location.pathname === Discourse.getURL("/") &&
|
||||
(window.location.pathname === Discourse.getURL("/") ||
|
||||
window.location.pathname === Discourse.getURL("/login")) &&
|
||||
this.shortSiteDescription !== ""
|
||||
) {
|
||||
tokens.push(this.shortSiteDescription);
|
||||
|
@ -51,6 +51,14 @@ class StaticController < ApplicationController
|
||||
return
|
||||
end
|
||||
|
||||
unless @title.present?
|
||||
@title = if SiteSetting.short_site_description.present?
|
||||
"#{SiteSetting.title} - #{SiteSetting.short_site_description}"
|
||||
else
|
||||
SiteSetting.title
|
||||
end
|
||||
end
|
||||
|
||||
if I18n.exists?("static.#{@page}")
|
||||
render html: I18n.t("static.#{@page}"), layout: !request.xhr?, formats: [:html]
|
||||
return
|
||||
|
@ -4,6 +4,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %><%= @title %><% end %>
|
||||
<% content_for :head do %>
|
||||
<%= raw crawlable_meta_data(title: SiteSetting.title, description: SiteSetting.site_description) %>
|
||||
<%= raw crawlable_meta_data(title: @title, description: SiteSetting.site_description) %>
|
||||
<% end %>
|
||||
|
Loading…
Reference in New Issue
Block a user