forked from Celo-HaiTi/celoht-siteweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
29 lines (25 loc) · 825 Bytes
/
Copy pathnext.config.ts
File metadata and controls
29 lines (25 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type { NextConfig } from "next";
import createMDX from "@next/mdx";
const repoName = process.env.GITHUB_REPOSITORY?.split("/")[1] ?? "";
const isGitHubPages =
process.env.GITHUB_PAGES === "true" ||
process.env.NEXT_PUBLIC_USE_PROJECT_BASE_PATH === "true";
const basePath = isGitHubPages ? `/${repoName || "celoht-siteweb"}` : "";
const nextConfig: NextConfig = {
output: "export",
reactStrictMode: true,
pageExtensions: ["ts", "tsx", "mdx"],
trailingSlash: true,
skipTrailingSlashRedirect: true,
basePath,
assetPrefix: basePath || undefined,
images: {
unoptimized: true,
remotePatterns: [
{ protocol: "https", hostname: "docs.minipay.xyz" },
{ protocol: "https", hostname: "cdn.sanity.io" },
],
},
};
const withMDX = createMDX({});
export default withMDX(nextConfig);