SEO Update

This commit is contained in:
2026-01-23 19:43:42 +00:00
parent 9c70816fb6
commit 5967fc29a7
10 changed files with 290 additions and 32 deletions
+15 -1
View File
@@ -56,6 +56,20 @@ function make_slug(string $title, string $date): string {
return $t . '-' . $date;
}
function event_path(array $event): string {
if (!empty($event['slug'])) {
return '/event.php?slug=' . rawurlencode($event['slug']);
}
if (!empty($event['id'])) {
return '/event.php?id=' . rawurlencode($event['id']);
}
return '/event.php';
}
function event_url(array $event): string {
return rtrim(BASE_URL, '/') . event_path($event);
}
function sanitize_text(string $s): string {
return trim($s);
}
@@ -103,6 +117,7 @@ function render_event_jsonld_graph(array $events): string {
$graph[] = array_filter([
"@type" => "Event",
"name" => $e['title'],
"url" => event_url($e),
"startDate" => $start,
"eventStatus" => "https://schema.org/EventScheduled",
"eventAttendanceMode" => "https://schema.org/OfflineEventAttendanceMode",
@@ -214,4 +229,3 @@ function render_rich_text(string $input): string {
return $html;
}