mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Update slug url with new function's slugified url
This commit is contained in:
@@ -8,6 +8,7 @@ import Card from "@components/Card";
|
||||
import LinkButton from "@components/LinkButton.astro";
|
||||
import type { MarkdownInstance } from "astro";
|
||||
import type { Frontmatter } from "src/types";
|
||||
import slugify from "@utils/slugify";
|
||||
|
||||
export interface Props {
|
||||
pageNum: number;
|
||||
@@ -28,7 +29,7 @@ const next = pageNum < totalPages ? "" : "disabled";
|
||||
{
|
||||
posts.map(({ frontmatter }) => {
|
||||
return (
|
||||
<Card href={`/posts/${frontmatter.slug}`} post={frontmatter} />
|
||||
<Card href={`/posts/${slugify(frontmatter)}`} post={frontmatter} />
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user