diff --git a/app/helpers.php b/app/helpers.php index c9c722c..85d070b 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -80,9 +80,9 @@ function buildListItems(string $dir, Context $ctx, ?array $parentMetadata): arra $sortOrder = strtolower($parentMetadata['order'] ?? 'descending'); if ($sortOrder === 'ascending') { - usort($items, fn($a, $b) => strcmp($a['date'] ?? '', $b['date'] ?? '')); + usort($items, fn($a, $b) => strcmp($a['rawDate'] ?? '', $b['rawDate'] ?? '')); } else { - usort($items, fn($a, $b) => strcmp($b['date'] ?? '', $a['date'] ?? '')); + usort($items, fn($a, $b) => strcmp($b['rawDate'] ?? '', $a['rawDate'] ?? '')); } return $items;