Fix a repo link Gitea serves at a different path
ci / web (push) Successful in 2m39s
ci / python (push) Successful in 2m35s

The footer built `${REPO_URL}/blob/main/LICENSE` by hand. Gitea serves files
at /src/branch/<ref>/, not GitHub's /blob/<ref>/, 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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB
This commit is contained in:
karti-ai
2026-08-28 17:14:50 -07:00
parent 6c2f3899c8
commit f5f45df224
2 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { Link } from 'react-router-dom';
import { GitBranch } from 'lucide-react'; import { GitBranch } from 'lucide-react';
import { Separator } from '@/components/ui/separator'; 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'; import { Wordmark } from '@/components/site/Wordmark';
export function SiteFooter() { export function SiteFooter() {
@@ -55,7 +55,7 @@ export function SiteFooter() {
Licensed{' '} Licensed{' '}
<a <a
className="underline underline-offset-2 hover:text-accent-fg" className="underline underline-offset-2 hover:text-accent-fg"
href={`${REPO_URL}/blob/main/LICENSE`} href={repoFile('LICENSE')}
target="_blank" target="_blank"
rel="noreferrer noopener" rel="noreferrer noopener"
> >
+11
View File
@@ -3,6 +3,17 @@
* header and the footer can never disagree about them. * header and the footer can never disagree about them.
*/ */
export const REPO_URL = 'https://git.karti.ai/PIG/PIG-Demo'; export const REPO_URL = 'https://git.karti.ai/PIG/PIG-Demo';
/**
* A file in the repo, at main.
*
* Gitea serves paths at `/src/branch/<ref>/`, not GitHub's `/blob/<ref>/`. 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 PIG_URL = 'https://primeintellectgrowth.com';
export const VERIFIERS_WORDLE_URL = export const VERIFIERS_WORDLE_URL =
'https://github.com/PrimeIntellect-ai/verifiers/tree/main/environments/wordle'; 'https://github.com/PrimeIntellect-ai/verifiers/tree/main/environments/wordle';