Files
probably-rendering-one-more…/apps/wiki/src/content/page-links.ts
T
codex-bot 5f1af4e9f6
wiki CI and deployment / verify-and-deploy (push) Successful in 18m48s
Validate canonical notes and lightweight media in the full stack suite
2026-10-25 22:46:17 +08:00

7 lines
501 B
TypeScript

import ids from './page-ids.json';
// IDs are persisted, never derive them from titles or positions. Keep IDs when renaming a page.
export function pageId(key:string):string{return (ids as Record<string,string>)[key]||'';}
export const exploreUrl=(id:string)=>'/explore/'+encodeURIComponent(id);
export const guidanceUrl=(path:string)=>exploreUrl(pageId('guidance:'+path));
export function previewUrl(source:string,width=480){return '/api/preview?'+new URLSearchParams({source,width:String(width)});}