mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
build doc index to version dir if not latest
This commit is contained in:
@ -10,15 +10,15 @@ module.exports = function indexPage(renderDocsProcessor) {
|
|||||||
var currentVersion = versionData.current.name;
|
var currentVersion = versionData.current.name;
|
||||||
var latestVersion = versionData.latest.name;
|
var latestVersion = versionData.latest.name;
|
||||||
|
|
||||||
if (currentVersion == latestVersion) {
|
var versionPath = currentVersion == latestVersion ? '' : currentVersion;
|
||||||
docs.push({
|
|
||||||
docType: 'index-page',
|
docs.push({
|
||||||
id: 'index-page',
|
docType: 'index-page',
|
||||||
currentVersion: currentVersion,
|
id: 'index-page',
|
||||||
template: 'api_index.template.html',
|
currentVersion: currentVersion,
|
||||||
outputPath: 'docs/api/index.md'
|
template: 'api_index.template.html',
|
||||||
});
|
outputPath: 'docs/' + versionPath + '/api/index.md'
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user