mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
* basic subpages * add template descriptions * keep tabbed navigation alive * revert active tab * use bespoke layout for each template * redirect non-feature preview users away * template page improvements * fix docs link * add TemplateEditor * fix errors * better error for missing routes * extract slugifyTitle function to ensure consistent slugs
9 lines
325 B
TypeScript
9 lines
325 B
TypeScript
/**
|
|
* Convert template title to URL-friendly slug
|
|
* Shared function to ensure slug matching works correctly across multiple files
|
|
* Necessary because TEMPLATES_SCHEMAS does not provide a slug for each template
|
|
*/
|
|
export const slugifyTitle = (title: string) => {
|
|
return title.trim().replace(/\s+/g, '-').toLowerCase()
|
|
}
|