From 25e581a7eaaa1a9e07c2c1494e48cba025774103 Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 8 Dec 2016 15:39:40 -0600 Subject: [PATCH] chore(ci): updating dgeni processors and templates for new ionic-site structure --- scripts/docs/dgeni-config.js | 2 +- scripts/docs/processors/index-page.js | 2 +- scripts/docs/processors/jekyll.js | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index 40f12659c1..d129b907a0 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -77,7 +77,7 @@ module.exports = function(currentVersion, initialVersionBuild) { //Instead set latest version in docs root if not initial build var folder = (version == latestVersion) && !initialVersionBuild ? '' : version; return { - href: path.join('/' + config.v2DocsDir, folder), + href: path.join('/' + config.v2DocsDir, folder).replace('/content',''), folder: folder, name: version }; diff --git a/scripts/docs/processors/index-page.js b/scripts/docs/processors/index-page.js index 25dfd4e046..8eaf199659 100644 --- a/scripts/docs/processors/index-page.js +++ b/scripts/docs/processors/index-page.js @@ -19,7 +19,7 @@ module.exports = function indexPage(renderDocsProcessor) { id: 'index-page', currentVersion: currentVersion, template: 'api_index.template.html', - outputPath: 'docs/v2/' + versionPath + '/api/index.md' + outputPath: 'content/docs/v2/' + versionPath + '/api/index.md' }); } } diff --git a/scripts/docs/processors/jekyll.js b/scripts/docs/processors/jekyll.js index cc79aecd80..4d92a0587b 100644 --- a/scripts/docs/processors/jekyll.js +++ b/scripts/docs/processors/jekyll.js @@ -20,31 +20,35 @@ module.exports = function jekyll(renderDocsProcessor) { docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/') .replace('/index.md', '') .replace('//home/ubuntu/ionic/src', '') - .replace('//', '/'); + .replace('//', '/') + .replace('content/', ''); if (docs[i].relativePath) { docs[i].relativePath = doc.relativePath .replace('/home/ubuntu/ionic', ''); } + if (docs[i].href) { + docs[i].href = doc.href.replace('content/', ''); + } }); docs.push({ docType: 'api-menu', id: 'api-menu', template: 'api_menu.template.html', - outputPath: '_includes/v2_fluid/api_menu.html' + outputPath: 'content/_includes/v2_fluid/api_menu.html' }); docs.push({ docType: 'api-menu-flat-version', id: 'api-menu-flat-version', template: 'api_menu_flat_version.template.html', - outputPath: '_includes/v2_fluid/api_menu_flat_' + currentVersion + + outputPath: 'content/_includes/v2_fluid/api_menu_flat_' + currentVersion + '.html' }); docs.push({ docType: 'api-version-select', id: 'api-version-select', template: 'api_version_select.template.html', - outputPath: '_includes/v2_fluid/api_version_select.html' + outputPath: 'content/_includes/v2_fluid/api_version_select.html' }); // returning docs will replace docs object in the next process