diff --git a/docusaurus.config.js b/docusaurus.config.js index fb1b7511..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://docs.opensauced.pizza", - baseUrl: "/", + 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 new file mode 100644 index 00000000..67407c7b --- /dev/null +++ b/netlify.toml @@ -0,0 +1,4 @@ +[build] + base = "/" + publish = "build" # Make sure this points to the correct output directory + command = "npm run build" # The command to build your site