Skip to content

Commit c1e7d1c

Browse files
committed
fix: article index routing
1 parent 59b5ce3 commit c1e7d1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/koimi/src/components/article/ArticlePreviewCard.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
import type { CollectionEntry } from 'astro:content'
33
4+
import options from 'virtual:koimi/options'
5+
46
import ArticleTopBar from './ArticleTopBar.astro'
57
68
interface Props {
@@ -16,7 +18,7 @@ const { data: { published, summary, title }, id } = Astro.props.article
1618
>
1719
<div class="card-body">
1820
<ArticleTopBar {published} />
19-
<a href={`/articles/${id}`}><h2 class="card-title text-3xl">{title}</h2></a>
21+
<a href={`/${options.routes.articles.replace('[...slug]', id)}`}><h2 class="card-title text-3xl">{title}</h2></a>
2022
{summary && <p>{summary}</p>}
2123
</div>
2224
</article>

0 commit comments

Comments
 (0)