mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-14 08:53:11 +00:00
- Add Post + Tag collections (notícias/publicações) with tag-based "Esconder" visibility control for electoral-law compliance - Add static SEO routes /[type]/[category]/[slug] plus /[type] and /[type]/[category] listings, with shared header/breadcrumb and PostCard - Recreate the homepage and refresh the site color palette (styles.css) - Add posts/slug/seo utilities and revalidation wiring (documents.ts) - Add live-fetch seed script (scripts/seed-posts.mjs + seed-loader.mjs, db:seed:posts) - Upgrade Payload 3.79.0 -> 3.82.0 (fixes admin relationship-filter crash) - Remove obsolete Header component; add shadcn card/badge/breadcrumb; update AGENTS.md and components rule docs
8 lines
321 B
TypeScript
8 lines
321 B
TypeScript
export const slugify = (value: string): string =>
|
|
value
|
|
.normalize('NFD')
|
|
.replace(/[\u0300-\u036f]/g, '') // strip accents
|
|
.toLowerCase()
|
|
.replace(/[^a-z0-9]+/g, '-') // non-alphanumeric -> hyphen
|
|
.replace(/-+/g, '-') // collapse hyphens
|
|
.replace(/^-|-$/g, '') // trim leading/trailing hyphens
|