From f5f45df2244ef7c21480a1018c8c2c3e33685094 Mon Sep 17 00:00:00 2001 From: karti-ai <176560021+karti-ai@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:14:50 -0700 Subject: [PATCH] Fix a repo link Gitea serves at a different path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The footer built `${REPO_URL}/blob/main/LICENSE` by hand. Gitea serves files at /src/branch//, not GitHub's /blob//, and both hosts 200 on the repo root — so the link read fine in review and 404s only when clicked. That is exactly how it survived the move. There is now one `repoFile()` helper, so a single place knows the shape. Every repo link in the built output was resolved against the live Gitea instance: both 200. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB --- src/components/site/SiteFooter.tsx | 4 ++-- src/components/site/links.tsx | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/site/SiteFooter.tsx b/src/components/site/SiteFooter.tsx index 22afce3..93cc9cb 100644 --- a/src/components/site/SiteFooter.tsx +++ b/src/components/site/SiteFooter.tsx @@ -2,7 +2,7 @@ import { Link } from 'react-router-dom'; import { GitBranch } from 'lucide-react'; import { Separator } from '@/components/ui/separator'; -import { PIG_URL, REPO_URL } from '@/components/site/links'; +import { PIG_URL, REPO_URL, repoFile } from '@/components/site/links'; import { Wordmark } from '@/components/site/Wordmark'; export function SiteFooter() { @@ -55,7 +55,7 @@ export function SiteFooter() { Licensed{' '} diff --git a/src/components/site/links.tsx b/src/components/site/links.tsx index a447f8a..9ebfcae 100644 --- a/src/components/site/links.tsx +++ b/src/components/site/links.tsx @@ -3,6 +3,17 @@ * header and the footer can never disagree about them. */ export const REPO_URL = 'https://git.karti.ai/PIG/PIG-Demo'; + +/** + * A file in the repo, at main. + * + * Gitea serves paths at `/src/branch//`, not GitHub's `/blob//`. Both + * hosts 200 on the repo root, so a hand-built `/blob/main/...` link looks fine + * in review and 404s only when somebody clicks it — which is how this survived + * the move. One function, so there is a single place that knows the shape. + */ +export const repoFile = (path: string): string => + `${REPO_URL}/src/branch/main/${path.replace(/^\//, '')}`; export const PIG_URL = 'https://primeintellectgrowth.com'; export const VERIFIERS_WORDLE_URL = 'https://github.com/PrimeIntellect-ai/verifiers/tree/main/environments/wordle';