Skip to content

Commit 2d7a1b8

Browse files
authored
Merge pull request #235 from ELIXIR-NO/bianchini88-patch-2
getting rid of .mdx ending in URLs from featured news
2 parents 8d91847 + a0c3e71 commit 2d7a1b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/featured-news.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const news = (await getCollection("news"))
1010
{news.map((article) => {
1111
return (
1212
<li>
13-
<a href={`/news/${article.id}`}>
13+
<a href={`/news/${article.id.replace(/\.mdx$/, "")}`}>
1414
<span class="link block">{article.data.title}</span>
1515
<time class="datetime block text-sm">{article.data.date}</time>
1616
</a>

0 commit comments

Comments
 (0)