Skip to content

Commit 6403dac

Browse files
committed
Fix base image path for GH Pages.
1 parent d1eae7b commit 6403dac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

next.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const createMDX = require("@next/mdx");
22
const path = require("path");
33

4-
// Make GH Pages work for forks as well as the main openfresno.org repo.
4+
// Make images work with relative GH Pages URLS.
55
const isGitHubActions = process.env.GITHUB_ACTIONS === "true";
6-
const isMainRepo =
7-
process.env.GITHUB_REPOSITORY === "openfresno/openfresno.org";
86

9-
// Only set basePath if it's a fork.
10-
const basePath = isGitHubActions && !isMainRepo ? "/openfresno.org" : "";
7+
// Only set basePath if it is on GitHub Pages.
8+
const basePath = isGitHubActions ? "/fe-openfresno.org-doc" : "";
119

1210
/** @type {import('next').NextConfig} */
1311
const nextConfig = {

0 commit comments

Comments
 (0)