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