-
Notifications
You must be signed in to change notification settings - Fork 0
/
apos-config.js
80 lines (60 loc) · 1.77 KB
/
apos-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
'use strict';
const path = require('path');
const fs = require('fs');
const aposSearchFilters = require('./lib/constants/apos-search-filters');
const isProd = require('./lib/utils/is-prod')();
const customModuleNames = fs
.readdirSync(path.resolve(__dirname, 'lib', 'modules'))
.filter(dp => /^aem-/.test(dp));
const customModules = customModuleNames.reduce(
(acc, dp) => {
acc[dp] = {};
return acc;
},
{}
);
const aposOptions = {
root: module,
shortName: 'arts-et-medias',
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.
modules: {
// Note: most configuration occurs in the respective
// modules' directories. See lib/apostrophe-assets/index.js for an example.
// However any modules that are not present by default in Apostrophe must at
// least have a minimal configuration here: `moduleName: {}`
'apostrophe-assets': {
minify: isProd,
},
'apostrophe-templates': { viewsFolderFallback: path.join(__dirname, 'views') },
'apostrophe-docs': {
// present clear error message every time a slug is in conflict, forcing a manual choice
deconflictSlugs: false
},
'apostrophe-db-mongo-3-driver': {},
'apostrophe-rich-text-permalinks': {
join: {
withType: [
'apostrophe-page',
'article',
'book',
'project',
'education',
'event',
'person',
'organization',
'media',
]
}
},
'apostrophe-workflow': {
defaultMode: 'live'
},
'apostrophe-search': {
filters: aposSearchFilters
},
...customModules
}
};
module.exports = aposOptions;