-
Notifications
You must be signed in to change notification settings - Fork 0
/
sourcebit.js
32 lines (29 loc) · 1.22 KB
/
sourcebit.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
const _ = require('lodash');
const isDev = process.env.NODE_ENV === 'development';
module.exports = {
plugins: [
{
module: require('sourcebit-source-filesystem'),
options: {
watch: isDev
}
},
{
module: require('sourcebit-target-next'),
options: {
liveUpdate: isDev,
flattenAssetUrls: true,
pages: [
{ path: '/{__metadata.urlPath}', predicate: _.matchesProperty('__metadata.modelName', 'advanced') },
{ path: '/{__metadata.urlPath}', predicate: _.matchesProperty('__metadata.modelName', 'blog') },
{ path: '/{__metadata.urlPath}', predicate: _.matchesProperty('__metadata.modelName', 'page') },
{ path: '/{__metadata.urlPath}', predicate: _.matchesProperty('__metadata.modelName', 'post') }
],
commonProps: {
pages: { predicate: _.matchesProperty('__metadata.modelType', 'page') },
data: { single: true, predicate: _.matchesProperty('__metadata.id', 'sourcebit-source-filesystem:data') }
}
}
}
]
};