Skip to content

Commit

Permalink
fix 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
thejcannon committed Jan 2, 2024
1 parent 0954701 commit 14c6987
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ function getCurrentVersion() {
// - PANTSBUILD_ORG_INCLUDE_BLOG=1 -> Include the blog.
// Note that `NODE_ENV === 'production' builds _everything_.
const isDev = process.env.NODE_ENV === "development";
const disableVersioning =
isDev && process.env.PANTSBUILD_ORG_INCLUDE_VERSIONS === undefined;
const disableVersioning = isDev
? process.env.PANTSBUILD_ORG_INCLUDE_VERSIONS === undefined
: undefined;
const onlyIncludeVersions = isDev
? process.env.PANTSBUILD_ORG_INCLUDE_VERSIONS
? ["current"].concat(
Expand All @@ -29,7 +30,9 @@ const onlyIncludeVersions = isDev
: ["current"]
: undefined;
const currentVersion = getCurrentVersion();
const includeBlog = process.env.PANTSBUILD_ORG_INCLUDE_BLOG === "1" || !isDev;
const includeBlog = isDev
? process.env.PANTSBUILD_ORG_INCLUDE_BLOG === "1"
: undefined;

const config = {
title: "Pantsbuild",
Expand Down Expand Up @@ -63,7 +66,7 @@ const config = {
label: `${currentVersion} (dev)`,
path: currentVersion,
},
...(disableVersioning
...(disableVersioning === undefined
? {}
: versions.reduce((acc, version, index) => {
acc[version] = {
Expand Down

0 comments on commit 14c6987

Please sign in to comment.