mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +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 latestVersion = versionData.latest.name;
|
||||
|
||||
if (currentVersion == latestVersion) {
|
||||
var versionPath = currentVersion == latestVersion ? '' : currentVersion;
|
||||
|
||||
docs.push({
|
||||
docType: 'index-page',
|
||||
id: 'index-page',
|
||||
currentVersion: currentVersion,
|
||||
template: 'api_index.template.html',
|
||||
outputPath: 'docs/api/index.md'
|
||||
outputPath: 'docs/' + versionPath + '/api/index.md'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user