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:
@@ -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('');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user