diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index 92e53db897..edc230e982 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -71,8 +71,6 @@ module.exports = function(currentVersion){ computePathsProcessor.pathTemplates = [{ docTypes: ['class', 'var', 'function', 'let'], getOutputPath: function(doc) { - // TODO(tlancina): Use nightly if version isn't specified by gulp task - // TODO(tlancina): inject api base path return 'docs/' + (versionData.current.folder || '') + '/api/' + doc.fileInfo.relativePath // strip ionic from path root .replace(/^ionic\//, '') diff --git a/scripts/docs/processors/index-page.js b/scripts/docs/processors/index-page.js index 8b56f20265..2e387d9099 100644 --- a/scripts/docs/processors/index-page.js +++ b/scripts/docs/processors/index-page.js @@ -1,18 +1,18 @@ -module.exports = function indexPage() { +module.exports = function indexPage(renderDocsProcessor) { return { name: 'index-page', description: 'Create documentation index page', - version: 'nightly', $runAfter: ['adding-extra-docs'], $runBefore: ['extra-docs-added'], $process: function(docs) { - //TODO(tlancina): inject api base path or at least version + var currentVersion = renderDocsProcessor.extraData.version.current.name; + docs.push({ docType: 'index-page', id: 'index-page', - currentVersion: this.version, + currentVersion: currentVersion, template: 'api_index.template.html', - outputPath: 'docs/2.0.0-alpha.2/api/index.md' + outputPath: 'docs/' + currentVersion + '/api/index.md' }); } } diff --git a/scripts/docs/processors/jekyll.js b/scripts/docs/processors/jekyll.js index 7f452b8ee4..1896ef4d56 100644 --- a/scripts/docs/processors/jekyll.js +++ b/scripts/docs/processors/jekyll.js @@ -1,12 +1,11 @@ -module.exports = function jekyll(){ +module.exports = function jekyll(renderDocsProcessor){ return { name: 'jekyll', description: 'Create jekyll includes', $runAfter: ['adding-extra-docs'], $runBefore: ['extra-docs-added'], $process: function(docs) { - //TODO(tlancina): supply this via DI - var currentVersion = '2.0.0-alpha.2'; + var currentVersion = renderDocsProcessor.extraData.version.current.name; docs.push({ docType: 'api-menu',