Download code/web/src/lib/links.ts from MiniMaxAI/oss-ecosystem-data: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/datasets/MiniMaxAI/oss-ecosystem-data/resolve/ff9fcdd398354eeb4408a44bf02996b20d7dd295/code/web/src/lib/links.ts
- Command line
-
hf download hf://datasets/MiniMaxAI/oss-ecosystem-data@ff9fcdd398354eeb4408a44bf02996b20d7dd295/code/web/src/lib/links.ts
-
curl -L -o links.ts https://huggingface.co/datasets/MiniMaxAI/oss-ecosystem-data/resolve/ff9fcdd398354eeb4408a44bf02996b20d7dd295/code/web/src/lib/links.ts
1.11 kB
| import { getLang } from "@/lib/i18n" | |
| /** The official page for a modality's models: every language release links to M Plan, every | |
| * video and image release to the H3 Family page. English goes to minimax.io, Chinese to the | |
| * same pages on minimax.cn. Shown as a button on each release's page and in the Models menu. | |
| * Keys are category keys (org.CATEGORY_NAME). */ | |
| const PAGE: Record<string, { label: string; path: string }> = { | |
| language: { label: "M Plan", path: "/m-plan" }, | |
| video: { label: "H3 Family", path: "/h3-family" }, | |
| image: { label: "H3 Family", path: "/h3-family" }, | |
| } | |
| const site = () => (getLang() === "zh" ? "https://www.minimax.cn" : "https://www.minimax.io") | |
| export function officialPage(cat: string): { label: string; href: string } | undefined { | |
| const p = PAGE[cat] | |
| return p && { label: p.label, href: site() + p.path } | |
| } | |
| /** The same pages once each, for the menu (H3 Family first, as the video category leads the page). */ | |
| export const officialLinks = () => | |
| [...new Map(["video", "image", "language"].map((c) => officialPage(c)!).map((l) => [l.href, l])).values()] | |