Skip to content

Commit b96f9d0

Browse files
committed
fix(website): correct GitHub Pages basePath casing (/RepoLens)
The Pages project path is case-sensitive and the repo's canonical name is `RepoLens`, but the basePath was `/repolens`. Every asset was referenced at /repolens/_next/... and 404'd against the real /RepoLens/... path, so the site loaded completely unstyled — this was the original "site is broken". - deploy-pages.yml: NEXT_PUBLIC_BASE_PATH /repolens -> /RepoLens - layout.tsx metadataBase -> https://new1direction.github.io/RepoLens/ - capitalize the GitHub repo URLs to the canonical casing Verified: the static export now references /RepoLens/_next/... and /RepoLens/mascot.mp4.
1 parent 62754b1 commit b96f9d0

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ jobs:
3838
- name: Build static export
3939
working-directory: website
4040
env:
41-
# Project Pages site is served under /<repo>/.
42-
NEXT_PUBLIC_BASE_PATH: /repolens
41+
# Project Pages site is served under /<repo>/ — and the path is
42+
# CASE-SENSITIVE, so this must match the canonical repo name exactly.
43+
NEXT_PUBLIC_BASE_PATH: /RepoLens
4344
run: npm run build
4445
- name: Disable Jekyll (serve _next/ as-is)
4546
run: touch website/out/.nojekyll

website/app/layout.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export const baseOptions: BaseLayoutProps = {
2020
url: '/changelog',
2121
},
2222
],
23-
githubUrl: 'https://github.com/New1Direction/repolens',
23+
githubUrl: 'https://github.com/New1Direction/RepoLens',
2424
};

website/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import './global.css';
88
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? '';
99

1010
export const metadata: Metadata = {
11-
metadataBase: new URL('https://new1direction.github.io/repolens/'),
11+
metadataBase: new URL('https://new1direction.github.io/RepoLens/'),
1212
title: {
1313
default: 'RepoLens — read code before you trust it',
1414
template: '%s · RepoLens',

website/components/site/SiteHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link';
22
import { Vee } from './Vee';
33
import { ThemeToggle } from './ThemeToggle';
44

5-
export const GITHUB_URL = 'https://github.com/New1Direction/repolens';
5+
export const GITHUB_URL = 'https://github.com/New1Direction/RepoLens';
66

77
export function SiteHeader() {
88
return (

website/next.config.mjs

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

55
// On GitHub Pages a project site is served under /<repo>/, so CI sets
6-
// NEXT_PUBLIC_BASE_PATH=/repolens. Locally it's unset (served at root).
6+
// NEXT_PUBLIC_BASE_PATH=/RepoLens (case-sensitive — must match the repo name).
7+
// Locally it's unset (served at root).
78
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || undefined;
89

910
/** @type {import('next').NextConfig} */

0 commit comments

Comments
 (0)