-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.js
35 lines (26 loc) · 1004 Bytes
/
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
module.exports = {
'csv' : 'content.csv',
'transform' : function (content) {
// Set page name
content.name = content.jcr_title.toLowerCase().replace(/[^a-z0-9\-\_]/g, '-');
// Set import file
content.importFile = '.content.xml';
// Set import path
content.importPath = 'content/'+content.name;
// Set import template
content.importTemplate = 'template.mustache.xml';
// Set summary text
content.summary = '<p>'+content.summary+'</p>';
// Set features text
var features = content.features.split('\r');
content.features = '';
for (var i = 0; i < features.length; ++i) {
content.features += '<li>'+features[i]+'</li>';
}
if (content.features) {
content.features = '<ul>'+content.features+'</ul>';
}
//console.log(content);
return content;
}
};