From f6cf8b850f05d0593b672d9f7b3082ea6301eb19 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 10:30:14 -0400 Subject: [PATCH 1/7] Change base url --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index fb1b7511..dee30d25 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -7,7 +7,7 @@ module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", url: "https://docs.opensauced.pizza", - baseUrl: "/", + baseUrl: "/docs", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", From 2737ddd1b29e1f6e6921f269bbe8ee6ad6927ce5 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 10:43:10 -0400 Subject: [PATCH 2/7] Change url --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index dee30d25..84508f64 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -6,7 +6,7 @@ const darkCodeTheme = themes.dracula; module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", - url: "https://docs.opensauced.pizza", + url: "https://opensauced.pizza", baseUrl: "/docs", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", From bcf6d4768edb39fc154b262573435b067f4e5572 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 12:00:15 -0400 Subject: [PATCH 3/7] Fix config --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 84508f64..c800028a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -7,7 +7,7 @@ module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", url: "https://opensauced.pizza", - baseUrl: "/docs", + baseUrl: "/docs/", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", From df4a64e2c4eb239cb535a3e38a61bcc0b033169a Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 12:16:28 -0400 Subject: [PATCH 4/7] Change base url again --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index c800028a..4eca2f97 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -7,7 +7,7 @@ module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", url: "https://opensauced.pizza", - baseUrl: "/docs/", + baseUrl: "/", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", From d675ae7b028159ed887b45aa6634eae89f6e72c3 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 12:24:42 -0400 Subject: [PATCH 5/7] Another try --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 4eca2f97..c800028a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -7,7 +7,7 @@ module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", url: "https://opensauced.pizza", - baseUrl: "/", + baseUrl: "/docs/", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", From 760c46207b91c10c7da75276795e767901563e53 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 12:44:13 -0400 Subject: [PATCH 6/7] Add file to see if that fixes deploy --- netlify.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..4efbe7a1 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,9 @@ +[build] + base = "/" + publish = "build" # Make sure this points to the correct output directory + command = "npm run build" # The command to build your site + +[[redirects]] + from = "/*" + to = "/docs/:splat" + status = 200 From 12588c65a4b8f77b1a934bf7d0801544a8d232f7 Mon Sep 17 00:00:00 2001 From: Bekah Hawrot Weigel Date: Wed, 29 May 2024 15:37:05 -0400 Subject: [PATCH 7/7] Add env var for prod v. deploy --- docusaurus.config.js | 6 ++++-- netlify.toml | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index c800028a..d990aaee 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,13 +1,15 @@ const { themes } = require('prism-react-renderer'); const lightCodeTheme = themes.github; const darkCodeTheme = themes.dracula; +// This is defined in the Netlify environment variables on the Netlify UI +const { ADD_SLASH_DOCS_TO_URL } = process.env; /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { title: "OpenSauced", tagline: "The path to your next Open Source contribution", - url: "https://opensauced.pizza", - baseUrl: "/docs/", + url: ADD_SLASH_DOCS_TO_URL ? "https://opensauced.pizza" : "https://docs.opensauced.pizza", + baseUrl: ADD_SLASH_DOCS_TO_URL ? "/docs/" : "/", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", favicon: "img/favicon.ico", diff --git a/netlify.toml b/netlify.toml index 4efbe7a1..67407c7b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,8 +2,3 @@ base = "/" publish = "build" # Make sure this points to the correct output directory command = "npm run build" # The command to build your site - -[[redirects]] - from = "/*" - to = "/docs/:splat" - status = 200