Unify content under ID-based note dialogs with lightweight previews and Studio proxy
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
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=640){return '/api/preview?'+new URLSearchParams({source,width:String(width)});}
|
||||
Reference in New Issue
Block a user