favicon: Redo favicon customization

This commit is contained in:
Richard Hansen 2021-04-20 00:53:22 -04:00
parent 92e0bff80c
commit ea8846154f
10 changed files with 64 additions and 13 deletions

View file

@ -80,6 +80,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
args.app.get('/favicon.ico', (req, res, next) => {
(async () => {
const fns = [
...(settings.favicon ? [path.resolve(settings.root, settings.favicon)] : []),
path.join(settings.root, 'src', 'static', 'skins', settings.skinName, 'favicon.ico'),
path.join(settings.root, 'src', 'static', 'favicon.ico'),
];

View file

@ -50,11 +50,12 @@ console.log('All relative paths will be interpreted relative to the identified '
exports.title = 'Etherpad';
/**
* The app favicon fully specified url, visible e.g. in the browser window
* Pathname of the favicon you want to use. If null, the skin's favicon is
* used if one is provided by the skin, otherwise the default Etherpad favicon
* is used. If this is a relative path it is interpreted as relative to the
* Etherpad root directory.
*/
exports.favicon = 'favicon.ico';
exports.faviconPad = `../${exports.favicon}`;
exports.faviconTimeslider = `../../${exports.favicon}`;
exports.favicon = null;
/*
* Skin name.