|
@@ -9,6 +9,7 @@ module.exports = function(crowi, app, req, locals) {
|
|
|
passportService,
|
|
passportService,
|
|
|
appService,
|
|
appService,
|
|
|
fileUploadService,
|
|
fileUploadService,
|
|
|
|
|
+ customizeService,
|
|
|
} = crowi;
|
|
} = crowi;
|
|
|
debug('initializing swigFunctions');
|
|
debug('initializing swigFunctions');
|
|
|
|
|
|
|
@@ -64,6 +65,7 @@ module.exports = function(crowi, app, req, locals) {
|
|
|
*/
|
|
*/
|
|
|
locals.appService = appService;
|
|
locals.appService = appService;
|
|
|
locals.fileUploadService = fileUploadService;
|
|
locals.fileUploadService = fileUploadService;
|
|
|
|
|
+ locals.customizeService = customizeService;
|
|
|
|
|
|
|
|
locals.noCdn = function() {
|
|
locals.noCdn = function() {
|
|
|
return !!process.env.NO_CDN;
|
|
return !!process.env.NO_CDN;
|
|
@@ -125,25 +127,10 @@ module.exports = function(crowi, app, req, locals) {
|
|
|
return process.env.HACKMD_URI != null;
|
|
return process.env.HACKMD_URI != null;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- locals.customCss = function() {
|
|
|
|
|
- const customizeService = crowi.customizeService;
|
|
|
|
|
- return customizeService.getCustomCss();
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- locals.customScript = function() {
|
|
|
|
|
- const customizeService = crowi.customizeService;
|
|
|
|
|
- return customizeService.getCustomScript();
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
locals.customHeader = function() {
|
|
locals.customHeader = function() {
|
|
|
return configManager.getConfig('crowi', 'customize:header') || '';
|
|
return configManager.getConfig('crowi', 'customize:header') || '';
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- locals.customTitle = function(page) {
|
|
|
|
|
- const customizeService = crowi.customizeService;
|
|
|
|
|
- return customizeService.generateCustomTitle(page);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
locals.parentPath = function(path) {
|
|
locals.parentPath = function(path) {
|
|
|
if (path === '/') {
|
|
if (path === '/') {
|
|
|
return path;
|
|
return path;
|