Migrate to limax for slugify (CKJ languages bug)

This commit is contained in:
prototypa
2022-08-31 14:02:57 -04:00
parent 7deb304087
commit 3012b47991
7 changed files with 20 additions and 22 deletions

View File

@ -31,9 +31,9 @@ const meta = {
<Layout meta={meta}>
<Fragment slot="title">
News and step-by-step guides about
<span class="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-pink-500">AstroWind
<span class="bg-clip-text text-transparent bg-gradient-to-r from-primary-500 to-secondary-500">AstroWind
</span>
</Fragment>
<BlogList page={page} />
<BlogList posts={page.data} />
<Pagination prevUrl={page.url.prev} nextUrl={page.url.next} />
</Layout>

View File

@ -1,6 +1,6 @@
---
import { SITE, BLOG } from "~/config.mjs";
import { getCanonical, getPermalink } from "~/utils/permalinks";
import { getCanonical, getPermalink, cleanSlug, BLOG_BASE } from "~/utils/permalinks";
import { fetchPosts } from "~/utils/fetchPosts";
import { findImage } from "~/utils/findImage";
import Layout from "~/layouts/PageLayout.astro";
@ -13,7 +13,7 @@ export async function getStaticPaths() {
const posts = await fetchPosts();
return posts.map((post) => ({
params: { slug: post.slug, blog: BLOG.postsWithoutBlogSlug ? undefined : BLOG?.slug || undefined },
params: { slug: cleanSlug(post.slug), blog: BLOG.postsWithoutBlogSlug ? undefined : BLOG_BASE || undefined },
props: { post },
}));
}