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';