mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(docs): make all versions except current generate index.md
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = {
|
||||
currentVersion = config.get('currentVersion');
|
||||
contentsFolder = config.get('rendering.contentsFolder');
|
||||
},
|
||||
process: function(docs) {
|
||||
process: function(docs, config) {
|
||||
docs.push({
|
||||
docType: 'index-page',
|
||||
id: 'index-page',
|
||||
@@ -20,5 +20,14 @@ module.exports = {
|
||||
template: 'index.template.html',
|
||||
outputPath: contentsFolder + '/api/index.md'
|
||||
});
|
||||
if (config.get('versionData').latest.name !== currentVersion) {
|
||||
docs.push({
|
||||
docType: 'index-page',
|
||||
id: 'index-page',
|
||||
currentVersion: currentVersion,
|
||||
template: 'index.template.html',
|
||||
outputPath: contentsFolder + '/api/index.md'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user