diff --git a/.github/scripts/createDocsRoutes.js b/.github/scripts/createDocsRoutes.js index 6604a9d207fa..7c9ac532850d 100644 --- a/.github/scripts/createDocsRoutes.js +++ b/.github/scripts/createDocsRoutes.js @@ -16,7 +16,12 @@ const platformNames = { * @returns {String} */ function toTitleCase(str) { - return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1)); + return _.map(str.split(' '), (word, i) => { + if (i !== 0 && (word.toLowerCase() === 'a' || word.toLowerCase() === 'the' || word.toLowerCase() === 'and')) { + return word.toLowerCase(); + } + return word.charAt(0).toUpperCase() + word.substring(1); + }).join(' '); } /** diff --git a/docs/articles/expensify-classic/getting-started/Tips-And-Tricks.md b/docs/articles/expensify-classic/getting-started/Tips-and-Tricks.md similarity index 100% rename from docs/articles/expensify-classic/getting-started/Tips-And-Tricks.md rename to docs/articles/expensify-classic/getting-started/Tips-and-Tricks.md