-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathclient-config.js
31 lines (29 loc) · 1.02 KB
/
client-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
import SilexCms from './js/silex-cms/client.js'
import onboarding from './js/client-plugins/onboarding.js'
// This file is loaded by Silex when the user opens the editor
// Its path is set in the environment variable SILEX_CLIENT_CONFIG in index.js
import websiteInfoPlugin from './plugins/client/website-info.js'
export default async function (config) {
config.addPlugin(websiteInfoPlugin, {})
config.addPlugin(onboarding, {})
config.addPublicationTransformers({
transformPermalink: (path, type) => {
// Replace /index.html with /
return type === 'html' && path.endsWith('/index.html') ? path.replace(/index\.html$/, '') : path
},
})
// CMS Plugin
config.addPlugin(SilexCms, {
dataSources: [],
imagePlugin: false,
i18nPlugin: false,
fetchPlugin: false,
// enable11ty: false,
view: {
// disableStates: true,
// disableAttributes: false,
// disableProperties: true,
},
})
return {}
}