Add some slugify to permalinks

This commit is contained in:
prototypa
2022-08-30 12:19:35 -04:00
parent 2912a796a7
commit 2afa6b1d64
5 changed files with 28 additions and 22 deletions

View File

@ -4,7 +4,7 @@ import { fetchPosts } from "~/utils/fetchPosts";
import Layout from "~/layouts/BlogLayout.astro";
import BlogList from "~/components/widgets/BlogList.astro";
import Pagination from "~/components/widgets/Pagination.astro";
import { getCanonical, getPermalink } from "~/utils/permalinks";
import { getCanonical, getPermalink, BLOG_BASE } from "~/utils/permalinks";
export async function getStaticPaths({ paginate }) {
@ -13,7 +13,7 @@ export async function getStaticPaths({ paginate }) {
const posts = await fetchPosts();
return paginate(posts, {
params: { blog: BLOG?.slug || undefined },
params: { blog: BLOG_BASE || undefined },
pageSize: BLOG.postsPerPage,
});
}