Skip to content

Commit 1a4c9e2

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-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: 3 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) {
@@ -16,6 +17,7 @@ if (isGithubActions) {
1617
/** @type {import('next').NextConfig} */
1718
const config = {
1819
reactStrictMode: true,
20+
scrollRestoration: true,
1921
output: "export",
2022
assetPrefix,
2123
basePath,

0 commit comments

Comments
 (0)