FIX: add short description to title on client side

This commit is contained in:
Maja Komel 2019-05-07 13:21:54 +02:00
parent 1569cf85df
commit 77af097ce0
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ function unlessReadOnly(method, message) {
const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
siteTitle: setting("title"),
shortSiteDescription: setting("short_site_description"),
actions: {
toggleAnonymous() {
@ -41,6 +42,9 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
_collectTitleTokens(tokens) {
tokens.push(this.get("siteTitle"));
if (window.location.pathname === Discourse.getURL("/")) {
tokens.push(this.get("shortSiteDescription"));
}
Discourse.set("_docTitle", tokens.join(" - "));
},

View File

@ -33,6 +33,7 @@ required:
default: ""
short_site_description:
default: ""
client: true
contact_email:
client: true
default: ""