mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
chore(): begin adding ionic components to mono-repo.
This commit is contained in:
26
packages/ionic-angular/scripts/docs/processors/index-page.js
Normal file
26
packages/ionic-angular/scripts/docs/processors/index-page.js
Normal file
@ -0,0 +1,26 @@
|
||||
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;
|
||||
|
||||
// var versionPath = currentVersion == 'nightly' ? '' : currentVersion;
|
||||
// If latest and not initial build, set path to docs root
|
||||
var versionPath = (currentVersion == latestVersion) && !versionData.initialVersionBuild ? '' : currentVersion;
|
||||
|
||||
docs.push({
|
||||
docType: 'index-page',
|
||||
id: 'index-page',
|
||||
currentVersion: currentVersion,
|
||||
template: 'api_index.template.html',
|
||||
outputPath: 'content/docs/' + versionPath + '/api/index.md'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user