From d498f9823afe0e12c607b551d088af04868ca1be Mon Sep 17 00:00:00 2001 From: Ibby Date: Thu, 16 Mar 2017 17:00:10 -0400 Subject: [PATCH] chore(docs): replace all spaces with dashes --- scripts/docs/dgeni-config.js | 3 ++- scripts/docs/processors/jekyll.js | 2 +- scripts/docs/templates/native_menu.template.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index 7f0f87530..5b47e9f78 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -164,7 +164,8 @@ module.exports = function(currentVersion) { templateEngine.filters.push( require('./filters/capital'), require('./filters/code'), - require('./filters/dump') + require('./filters/dump'), + require('./filters/dashify') ); templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates')); diff --git a/scripts/docs/processors/jekyll.js b/scripts/docs/processors/jekyll.js index 0122b7afd..993224985 100644 --- a/scripts/docs/processors/jekyll.js +++ b/scripts/docs/processors/jekyll.js @@ -17,7 +17,7 @@ module.exports = function jekyll(renderDocsProcessor) { return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; }); docs.forEach(function(doc, i) { - doc.outputPath = doc.outputPath.toLowerCase().replace(' ', '-'); + doc.outputPath = doc.outputPath.toLowerCase().replace(/\s/g, '-'); docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/') .replace('/index.md', '') .replace('content/', ''); diff --git a/scripts/docs/templates/native_menu.template.html b/scripts/docs/templates/native_menu.template.html index abdcd033c..abe7a91c3 100644 --- a/scripts/docs/templates/native_menu.template.html +++ b/scripts/docs/templates/native_menu.template.html @@ -1,9 +1,9 @@ <@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @> -
  • +
  • <$ doc.name $>
  • <@ endif @><@ endfor @> <@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @> -
  • +
  • <$ doc.name $> β
  • <@ endif @><@ endfor @>