Add human-readable event URL slugs with legacy redirect support.

Store unique slugs on events, backfill existing records, redirect old UUID and alias URLs to canonical slug pages, and expose slug editing plus alias management in the admin event modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michilis
2026-06-05 04:09:05 +00:00
parent d09c87a5a5
commit 1b2463f4bc
15 changed files with 361 additions and 33 deletions

View File

@@ -11,6 +11,7 @@ interface LlmsFaq {
interface LlmsEvent {
id: string;
slug: string;
title: string;
titleEs?: string;
shortDescription?: string;
@@ -193,7 +194,7 @@ export async function GET() {
if (nextEvent.availableSeats !== undefined) {
lines.push(`- Capacity Remaining: ${nextEvent.availableSeats}`);
}
lines.push(`- Tickets URL: ${siteUrl}/events/${nextEvent.id}`);
lines.push(`- Tickets URL: ${siteUrl}/events/${nextEvent.slug}`);
if (nextEvent.shortDescription) {
lines.push(`- Description: ${nextEvent.shortDescription}`);
}
@@ -226,7 +227,7 @@ export async function GET() {
if (event.availableSeats !== undefined) {
lines.push(`- Capacity Remaining: ${event.availableSeats}`);
}
lines.push(`- Tickets URL: ${siteUrl}/events/${event.id}`);
lines.push(`- Tickets URL: ${siteUrl}/events/${event.slug}`);
lines.push('');
}
}