From 6d543fbcb330de71a7b3254f6252640383e374cc Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 2 Nov 2012 12:30:57 +0100 Subject: [PATCH] Add a setting for customizing the app title the app title is inserted into the of all tepmlates --- settings.json.template | 3 +++ src/node/utils/Settings.js | 5 +++++ src/templates/index.html | 5 ++++- src/templates/pad.html | 2 +- src/templates/timeslider.html | 5 ++++- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/settings.json.template b/settings.json.template index 087c710c..95ed8c6a 100644 --- a/settings.json.template +++ b/settings.json.template @@ -4,6 +4,9 @@ Please edit settings.json, not settings.json.template */ { + // Name your instance! + "title": "Etherpad Lite", + //Ip and port which etherpad should bind at "ip": "0.0.0.0", "port" : 9001, diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 3d7894d5..38c98287 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -29,6 +29,11 @@ var vm = require('vm'); /* Root path of the installation */ exports.root = path.normalize(path.join(npm.dir, "..")); +/** + * The app title, visible e.g. in the browser window + */ +exports.title = "Etherpad Lite"; + /** * The IP ep-lite should listen to */ diff --git a/src/templates/index.html b/src/templates/index.html index cdd9346d..58af9a5e 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -1,7 +1,10 @@ +<% + var settings = require("ep_etherpad-lite/node/utils/Settings"); +%> <!doctype html> <html> - <title>Etherpad Lite + <%=settings.title%>