mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 04:43:43 +08:00
FIX: add short description to title on client side
This commit is contained in:
parent
1569cf85df
commit
77af097ce0
|
@ -22,6 +22,7 @@ function unlessReadOnly(method, message) {
|
||||||
|
|
||||||
const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
||||||
siteTitle: setting("title"),
|
siteTitle: setting("title"),
|
||||||
|
shortSiteDescription: setting("short_site_description"),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
toggleAnonymous() {
|
toggleAnonymous() {
|
||||||
|
@ -41,6 +42,9 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
||||||
|
|
||||||
_collectTitleTokens(tokens) {
|
_collectTitleTokens(tokens) {
|
||||||
tokens.push(this.get("siteTitle"));
|
tokens.push(this.get("siteTitle"));
|
||||||
|
if (window.location.pathname === Discourse.getURL("/")) {
|
||||||
|
tokens.push(this.get("shortSiteDescription"));
|
||||||
|
}
|
||||||
Discourse.set("_docTitle", tokens.join(" - "));
|
Discourse.set("_docTitle", tokens.join(" - "));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ required:
|
||||||
default: ""
|
default: ""
|
||||||
short_site_description:
|
short_site_description:
|
||||||
default: ""
|
default: ""
|
||||||
|
client: true
|
||||||
contact_email:
|
contact_email:
|
||||||
client: true
|
client: true
|
||||||
default: ""
|
default: ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user