mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
25 lines
773 B
JavaScript
25 lines
773 B
JavaScript
module.exports = function indexPage(renderDocsProcessor) {
|
|
return {
|
|
name: 'index-page',
|
|
description: 'Create documentation index page',
|
|
$runAfter: ['adding-extra-docs'],
|
|
$runBefore: ['extra-docs-added'],
|
|
$process: function(docs) {
|
|
//TODO(tlancina): move versionData into its own service
|
|
var versionData = renderDocsProcessor.extraData.version;
|
|
var currentVersion = versionData.current.name;
|
|
var latestVersion = versionData.latest.name;
|
|
|
|
if (currentVersion == latestVersion) {
|
|
docs.push({
|
|
docType: 'index-page',
|
|
id: 'index-page',
|
|
currentVersion: currentVersion,
|
|
template: 'api_index.template.html',
|
|
outputPath: 'docs/api/index.md'
|
|
});
|
|
}
|
|
}
|
|
}
|
|
};
|