diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-24 08:42:19 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-24 09:00:24 +0000 |
| commit | a8efefc12f21fc3b1fe3c32898cd50d0067b93c6 (patch) | |
| tree | e2224a7dbd15c5f7c4693ca438e7d83027856a69 /src/lib | |
| parent | 5515d5b2cce3cc43996850ff516fd1838f8fe8eb (diff) | |
Upgrades to Astro 5
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/newsUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/newsUtils.ts b/src/lib/newsUtils.ts index bffc7d6..233fdcf 100644 --- a/src/lib/newsUtils.ts +++ b/src/lib/newsUtils.ts @@ -25,7 +25,7 @@ export function getHref(newsItem: CollectionEntry<'news'>) { export function getSlug(newsItem: CollectionEntry<'news'>) { const toLowerCase = (s: string) => s.toLowerCase(); const matchLocales = new RegExp(`(${locales.map(toLowerCase).join('|')})/`); - return newsItem.slug.replace(matchLocales, ''); + return newsItem.id.replace(matchLocales, ''); } export function isNewsItemInLocale(newsItem: CollectionEntry<'news'>, locale: Locale) { |
