Skip to content

Commit

Permalink
fix: Change base url for subdirectory (#309)
Browse files Browse the repository at this point in the history
* Change base url

* Change url

* Fix config

* Change base url again

* Another try

* Add file to see if that fixes deploy

* Add env var for prod v. deploy
  • Loading branch information
BekahHW authored May 29, 2024
1 parent 363e8e0 commit b243676
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b243676

Please sign in to comment.