diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-25 17:56:03 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-25 17:56:03 +0100 |
| commit | 40921a489269e84f6930eaab7df955c4afd5ce7f (patch) | |
| tree | b1287c92fc9427f1bae85813b25236d3f20a12b7 /src/components/NewsIndex | |
| parent | 7c31c4cf897fef56dd05bc6afd6fc405f026c5e2 (diff) | |
Adds an RSS feed with news items
Diffstat (limited to 'src/components/NewsIndex')
| -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}> |
