Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/utils/docsLinks.ts from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/docsLinks.ts
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/utils/docsLinks.ts
-
curl -L -o docsLinks.ts https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/utils/docsLinks.ts
1.22 kB
| /** Absolute Docusaurus links for the Vite app (prod vs local docs origin). */ | |
| const DOCS_ORIGIN = import.meta.env.PROD | |
| ? 'https://www.communityone.com/docs' | |
| : 'http://localhost:3000/docs' | |
| /** Build an absolute docs URL. `path` is under the docs root (e.g. `/intro`). */ | |
| export function docsUrl(path: string): string { | |
| const rooted = path.startsWith('/') ? path : `/${path}` | |
| return `${DOCS_ORIGIN}${rooted}` | |
| } | |
| export const DOCS_INTRO = docsUrl('/intro') | |
| /** | |
| * Admin app path → docs path (no `/docs` prefix; `docsUrl` adds the origin). | |
| * Lighthouse intentionally omitted until a dedicated page exists. | |
| */ | |
| export const ADMIN_GUIDE_BY_PATH: Readonly<Record<string, string>> = { | |
| '/admin/batch-jobs': '/development/ai-policy-analysis', | |
| '/admin/meeting-kinds': '/development/jev-meeting-kind-gate', | |
| '/admin/application-links': '/development/data-center-application-links', | |
| } | |
| /** Absolute Guide href for an admin pathname, or null when unmapped. */ | |
| export function adminGuideHref(pathname: string): string | null { | |
| const entry = Object.entries(ADMIN_GUIDE_BY_PATH).find( | |
| ([appPath]) => pathname === appPath || pathname.startsWith(`${appPath}/`), | |
| ) | |
| return entry ? docsUrl(entry[1]) : null | |
| } |