diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/NewsIndex/NewsPreviewLink.astro | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/NewsIndex/NewsPreviewLink.astro b/src/components/NewsIndex/NewsPreviewLink.astro index aa8a371..d698a7a 100644 --- a/src/components/NewsIndex/NewsPreviewLink.astro +++ b/src/components/NewsIndex/NewsPreviewLink.astro @@ -2,6 +2,7 @@ import translate from '$i18n/translate'; import tComponent from '$i18n/translations/components/newsIndex'; import getLocaleFromPath from '$lib/getLocaleFromPath'; +import { getHref } from '$lib/newsUtils'; import type { CollectionEntry } from 'astro:content'; interface Props { @@ -14,7 +15,7 @@ const locale = getLocaleFromPath(Astro.url.pathname); const t = translate(locale); --- -<a class="news-index__item group-hover" href={`/${locale}/news/${newsItem.slug.replace('/', '-')}`}> +<a class="news-index__item group-hover" href={getHref(newsItem)}> <Fragment set:html={` <${headingLevel}>${newsItem.data.title}</${headingLevel}> |
