英文路径
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import type { BlogPost } from '@/lib/posts';
|
||||
import { getCategoryHref, type BlogPost } from '@/lib/posts';
|
||||
|
||||
interface Props {
|
||||
post: BlogPost;
|
||||
@@ -15,7 +15,7 @@ const { post } = Astro.props;
|
||||
{post.summary && <p>{post.summary}</p>}
|
||||
</a>
|
||||
<div class="meta-list">
|
||||
{post.categories.map((category) => <a href={`/categories/${encodeURIComponent(category)}/`}>{category}</a>)}
|
||||
{post.categories.map((category) => <a href={getCategoryHref(category)}>{category}</a>)}
|
||||
{post.tags.map((tag) => <a href={`/tags/${encodeURIComponent(tag)}/`}>#{tag}</a>)}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user