From 2b57274326e79b5b11924adc634323093741970a Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 19:50:16 -0300 Subject: [PATCH 1/8] chore(docs): update sitemap module config --- docs/nuxt.config.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index 3b75ff8dfa2..a69bb65bff1 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,17 +296,10 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: { - // Sitemaps requires a hostname, so we use localhost in - // non-prod mode just to make the sitemap module happy - hostname: IS_PROD_DOCS ? BASE_URL : 'http://localhost', - // Exclude all static routes when not prod - // Exclude only redirect routes in prod - exclude: IS_PROD_DOCS ? ['/docs/misc', '/docs/misc/**', '/docs/layout'] : ['/', '/**'], - // Include dynamic slug routes (from `generate.routes`) in prod, while - // in non-prod docs we do not include dynamic routes (empty array) - ...(IS_PROD_DOCS ? {} : { routes: [] }) - }, + sitemap: + IS_PROD_DOCS + ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } + : false, head: { meta: [{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }], From 67007f76fadb349041c4932509672587be5195de Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:00:05 -0300 Subject: [PATCH 2/8] lint --- docs/nuxt.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index a69bb65bff1..f38d1fded9d 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,10 +296,9 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: - IS_PROD_DOCS - ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } - : false, + sitemap: IS_PROD_DOCS + ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } + : false, head: { meta: [{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }], From 38311db5f6685774597875a39920e2973b0d6699 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:26:27 -0300 Subject: [PATCH 3/8] Update nuxt.config.js --- docs/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index f38d1fded9d..82cd2cf5387 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,7 +296,7 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: IS_PROD_DOCS + sitemap: !IS_PROD_DOCS ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } : false, From 863209f0f035bf1d0112d387a957edfeffcc0d51 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:33:31 -0300 Subject: [PATCH 4/8] Update nuxt.config.js --- docs/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index 82cd2cf5387..f38d1fded9d 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,7 +296,7 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: !IS_PROD_DOCS + sitemap: IS_PROD_DOCS ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } : false, From 4c4f82b7ff0747e473ac02fa8ce24e3cb904b99c Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:36:46 -0300 Subject: [PATCH 5/8] Update nuxt.config.js --- docs/nuxt.config.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index f38d1fded9d..e5b08d1979c 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,8 +296,14 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: IS_PROD_DOCS - ? { hostname: BASE_URL, defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } + sitemap: !IS_PROD_DOCS + ? { + hostname: BASE_URL, + // exclude any redirect pages from sitemaps + exclude: ['/docs/misc', '/docs/misc/**', '/docs/layout'], + // Default proeprties to apply to each URL entry + defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } + } : false, head: { From 1c8fda718ba30859019d23ae08b712938181ddff Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:43:10 -0300 Subject: [PATCH 6/8] Update nuxt.config.js --- docs/nuxt.config.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index e5b08d1979c..38e5b629b30 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -296,15 +296,19 @@ module.exports = { }, // We only include a populated `sitemap.xml` in production docs - sitemap: !IS_PROD_DOCS - ? { - hostname: BASE_URL, - // exclude any redirect pages from sitemaps - exclude: ['/docs/misc', '/docs/misc/**', '/docs/layout'], - // Default proeprties to apply to each URL entry - defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } - } - : false, + sitemap: () => { + // TESTING: switch to `!IS_PROD_DOCS` + if (IS_PROD_DOCS) { + return false + } + return { + hostname: BASE_URL, + // exclude any redirect pages from sitemaps + exclude: ['/docs/misc', '/docs/misc/**', '/docs/layout'], + // Default proeprties to apply to each URL entry + defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } + } + }, head: { meta: [{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }], From ce484a3ec3d7d3011feebfad5ece1f541494f871 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Mon, 11 May 2020 20:48:21 -0300 Subject: [PATCH 7/8] Update nuxt.config.js --- docs/nuxt.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index 38e5b629b30..981d6d91a1f 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -297,8 +297,8 @@ module.exports = { // We only include a populated `sitemap.xml` in production docs sitemap: () => { - // TESTING: switch to `!IS_PROD_DOCS` - if (IS_PROD_DOCS) { + if (!IS_PROD_DOCS) { + // Do not generate a sitemap for non-production docs return false } return { From 0ab84f76dc0b4aad26492f21733110c00d9fc58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 12 May 2020 01:51:12 +0200 Subject: [PATCH 8/8] Update nuxt.config.js --- docs/nuxt.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index 981d6d91a1f..fec90db34f3 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -297,15 +297,15 @@ module.exports = { // We only include a populated `sitemap.xml` in production docs sitemap: () => { + // Don't generate a sitemap for non-production docs if (!IS_PROD_DOCS) { - // Do not generate a sitemap for non-production docs return false } return { hostname: BASE_URL, - // exclude any redirect pages from sitemaps + // Exclude any redirect pages from sitemaps exclude: ['/docs/misc', '/docs/misc/**', '/docs/layout'], - // Default proeprties to apply to each URL entry + // Default properties to apply to each URL entry defaults: { changefreq: 'weekly', lastmod: new Date().toISOString() } } },