forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.config.js
69 lines (53 loc) · 1.87 KB
/
docs.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
var path = require('canonical-path');
var basePath = path.resolve(__dirname, '..');
var _ = require('lodash');
var basePackage = require('dgeni-packages/ngdoc');
var pkg = require('../package.json');
module.exports = function(config) {
config.set('currentVersion', process.env.DOC_VERSION || 'nightly');
config = basePackage(config);
config.set('logging.level', 'info');
config.prepend('rendering.templateFolders', [
path.resolve(__dirname, 'templates')
]);
config.set('basePath', __dirname);
config.set('source.projectPath', '.');
config.set('rendering.outputFolder', '../tmp/ionic-site');
var versionData = require('./generate-versions')(config);
config.set('versionData', versionData);
config.set('rendering.contentsFolder', path.join('docs', versionData.current.folder));
config.set('processing.api-docs', {
outputPath: 'api/${docType}/${name}/index.md',
path: 'api/${docType}/${name}/',
moduleOutputPath: 'api/module/${name}/index.md',
modulePath: 'api/module/${name}/'
});
config.append('rendering.filters', [
require('./filters/capital')
]);
config.set('source.files', [
{ pattern: 'js/**/*.js', basePath: basePath }
]);
config.append('processing.inlineTagDefinitions', [
require('./inline-tag-defs/link')
]);
config.append('processing.tagDefinitions', require('./tag-defs'));
//Don't conflict with the jekyll tags
config.set('rendering.nunjucks.config.tags', {
blockStart: '<@',
blockEnd: '@>',
variableStart: '<$',
variableEnd: '$>',
commentStart: '<#',
commentEnd: '#>'
});
config.append('processing.processors', [
require('./processors/latest-version'),
require('./processors/keywords'),
require('./processors/pages-data'),
require('./processors/index-page'),
require('./processors/version-data'),
require('./processors/jekyll')
]);
return config;
};