Merge pull request #120 from tpansino/feature/custom-document-title

Feature/custom document title
This commit is contained in:
Bastien Wirtz 2020-09-05 10:08:58 -07:00 committed by GitHub
commit f2eacfcba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Title, icons, links, colors, and services can be configured in the `config.yml`
title: "App dashboard" title: "App dashboard"
subtitle: "Homer" subtitle: "Homer"
# documentTitle: "Welcome" # Customize the browser tab text
logo: "assets/logo.png" logo: "assets/logo.png"
# Alternatively a fa icon can be provided: # Alternatively a fa icon can be provided:
# icon: "fas fa-skull-crossbones" # icon: "fas fa-skull-crossbones"

View File

@ -159,7 +159,7 @@ export default {
} }
this.config = merge(defaults, config); this.config = merge(defaults, config);
this.services = this.config.services; this.services = this.config.services;
document.title = `${this.config.title} | ${this.config.subtitle}`; document.title = this.config.documentTitle || `${this.config.title} | ${this.config.subtitle}`;
if (this.config.stylesheet) { if (this.config.stylesheet) {
let stylesheet = ""; let stylesheet = "";
for (const file of this.config.stylesheet) { for (const file of this.config.stylesheet) {