build doc index to version dir if not latest

This commit is contained in:
Tim Lancina
2015-09-04 15:34:40 -05:00
parent 920701e3fd
commit 3bfaabb993

View File

@ -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'
});
}
}
}
};