mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix api index version
This commit is contained in:
@ -5,15 +5,19 @@ module.exports = function indexPage(renderDocsProcessor) {
|
|||||||
$runAfter: ['adding-extra-docs'],
|
$runAfter: ['adding-extra-docs'],
|
||||||
$runBefore: ['extra-docs-added'],
|
$runBefore: ['extra-docs-added'],
|
||||||
$process: function(docs) {
|
$process: function(docs) {
|
||||||
var currentVersion = renderDocsProcessor.extraData.version.current.name;
|
var versionData = renderDocsProcessor.extraData.version;
|
||||||
|
var currentVersion = versionData.current.name;
|
||||||
|
var latestVersion = versionData.latest.name;
|
||||||
|
|
||||||
docs.push({
|
if (currentVersion == latestVersion) {
|
||||||
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/' + currentVersion + '/api/index.md'
|
template: 'api_index.template.html',
|
||||||
});
|
outputPath: 'docs/api/index.md'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user