diff --git a/gatsby-config.js b/gatsby-config.js index 75a9245aecd..8f20862e709 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -71,7 +71,7 @@ module.exports = { ], serialize: ({ site, allSitePage }) => allSitePage.edges.map((edge) => { - const ignore_localized_regex = /careers/ + const ignore_localized_regex = /careers|besquare/ const path = edge.node.path let priority = 0.7 const languages = Object.keys(language_config) diff --git a/gatsby-node.js b/gatsby-node.js index 33592b6d095..e1e82484276 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -102,19 +102,13 @@ exports.onCreatePage = ({ page, actions }) => { const { path, is_default } = language_config[lang] const localized_path = is_default ? page.path : `${path}${page.path}` const is_production = process.env.GATSBY_ENV === 'production' - const careers_regex = /^[a-z-]+\/careers\//g - const endpoint_regex = /^[a-z-]+\/endpoint\//g - const offline_plugin_regex = /^[a-z-]+\/offline-plugin-app-shell-fallback/g + const excluded_pages_regex = + /^[a-z-]+\/(careers|endpoint|offline-plugin-app-shell-fallback|besquare)\//g if (is_production) { if (path === 'ach') return } - if ( - careers_regex.test(localized_path) || - endpoint_regex.test(localized_path) || - offline_plugin_regex.test(localized_path) - ) - return + if (localized_path.match(excluded_pages_regex)) return if (!translations_cache[lang]) { const translation_json = require(`./src/translations/${lang}`)