mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
supply version info to docs processors
This commit is contained in:
@ -71,8 +71,6 @@ module.exports = function(currentVersion){
|
|||||||
computePathsProcessor.pathTemplates = [{
|
computePathsProcessor.pathTemplates = [{
|
||||||
docTypes: ['class', 'var', 'function', 'let'],
|
docTypes: ['class', 'var', 'function', 'let'],
|
||||||
getOutputPath: function(doc) {
|
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
|
return 'docs/' + (versionData.current.folder || '') + '/api/' + doc.fileInfo.relativePath
|
||||||
// strip ionic from path root
|
// strip ionic from path root
|
||||||
.replace(/^ionic\//, '')
|
.replace(/^ionic\//, '')
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
module.exports = function indexPage() {
|
module.exports = function indexPage(renderDocsProcessor) {
|
||||||
return {
|
return {
|
||||||
name: 'index-page',
|
name: 'index-page',
|
||||||
description: 'Create documentation index page',
|
description: 'Create documentation index page',
|
||||||
version: 'nightly',
|
|
||||||
$runAfter: ['adding-extra-docs'],
|
$runAfter: ['adding-extra-docs'],
|
||||||
$runBefore: ['extra-docs-added'],
|
$runBefore: ['extra-docs-added'],
|
||||||
$process: function(docs) {
|
$process: function(docs) {
|
||||||
//TODO(tlancina): inject api base path or at least version
|
var currentVersion = renderDocsProcessor.extraData.version.current.name;
|
||||||
|
|
||||||
docs.push({
|
docs.push({
|
||||||
docType: 'index-page',
|
docType: 'index-page',
|
||||||
id: 'index-page',
|
id: 'index-page',
|
||||||
currentVersion: this.version,
|
currentVersion: currentVersion,
|
||||||
template: 'api_index.template.html',
|
template: 'api_index.template.html',
|
||||||
outputPath: 'docs/2.0.0-alpha.2/api/index.md'
|
outputPath: 'docs/' + currentVersion + '/api/index.md'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
module.exports = function jekyll(){
|
module.exports = function jekyll(renderDocsProcessor){
|
||||||
return {
|
return {
|
||||||
name: 'jekyll',
|
name: 'jekyll',
|
||||||
description: 'Create jekyll includes',
|
description: 'Create jekyll includes',
|
||||||
$runAfter: ['adding-extra-docs'],
|
$runAfter: ['adding-extra-docs'],
|
||||||
$runBefore: ['extra-docs-added'],
|
$runBefore: ['extra-docs-added'],
|
||||||
$process: function(docs) {
|
$process: function(docs) {
|
||||||
//TODO(tlancina): supply this via DI
|
var currentVersion = renderDocsProcessor.extraData.version.current.name;
|
||||||
var currentVersion = '2.0.0-alpha.2';
|
|
||||||
|
|
||||||
docs.push({
|
docs.push({
|
||||||
docType: 'api-menu',
|
docType: 'api-menu',
|
||||||
|
Reference in New Issue
Block a user