Owner bought rithub.dev 2026-11-17; Rithub/Ritgram/Rit/gitgram-ai are all part of it now. Replaces every ritgram.ereboslab.com / git.ereboslab.com reference across Ritgram's pages/docs/sitemap/robots/og-tags with ritgram.rithub.dev / rithub.dev, and adds NEXT_PUBLIC_SITE_URL fallback accordingly. New honest /docs/rit page explains Rit (Rust git library, kept in this monorepo) is not the production forge engine (that's go-gitea/gitea), added to the sitemap. Old hosts (git.ereboslab.com, ritgram.ereboslab.com) now 301 to the new domain at the Caddy layer (box-side change, not in this commit) except /api/*, git smart-HTTP, and the Actions runner API, so existing clones/pushes/CI/mobile keep working unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
24 lines
851 B
TypeScript
24 lines
851 B
TypeScript
/**
|
|
* Shared forge helpers — small utilities so every repo card/link/badge in
|
|
* the UI treats Gitea (Rithub, our own code host at rithub.dev) as a
|
|
* first-class forge alongside GitHub, instead of assuming GitHub everywhere
|
|
* (plan §5.4).
|
|
*/
|
|
|
|
export type ForgeKind = 'github' | 'gitea'
|
|
|
|
/** Human label for a forge, used in badges and "View on X" links. */
|
|
export function forgeLabel(forge: string | null | undefined): string {
|
|
return forge === 'gitea' ? 'Rithub' : 'GitHub'
|
|
}
|
|
|
|
/** True when the forge value is our own Gitea instance. */
|
|
export function isGitea(forge: string | null | undefined): boolean {
|
|
return forge === 'gitea'
|
|
}
|
|
|
|
/** Short badge text shown next to a repo name/card for a non-GitHub forge. */
|
|
export function forgeBadgeText(forge: string | null | undefined): string | null {
|
|
return isGitea(forge) ? 'Rithub' : null
|
|
}
|