Skip to content

Commit 902ca23

Browse files
author
Dan Costello
committed
Ensure local dev mode and builds still function
1 parent 1a49283 commit 902ca23

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/(home)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function HomePage() {
2424

2525
<div className="flex flex-col sm:flex-row gap-4">
2626
<Link
27-
href="/docs"
27+
href={`${process.env.basePath}/docs`}
2828
className="inline-flex items-center justify-center rounded-lg bg-fd-primary px-6 py-3 text-sm font-medium text-white hover:bg-fd-primary/90 transition-colors"
2929
>
3030
Read Documentation

next.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { createMDX } from "fumadocs-mdx/next";
22
const withMDX = createMDX();
33

44
const isGithubActions = process.env.GITHUB_ACTIONS || false;
5+
const isProduction = process.env.NODE_ENV === "production";
56

6-
let assetPrefix = "./";
7+
let assetPrefix = isProduction ? "./" : "";
78
let basePath = "";
89

910
if (isGithubActions) {

0 commit comments

Comments
 (0)