Replaced contentlayer with keystatic
This commit is contained in:
@@ -4,9 +4,10 @@ import { notFound } from 'next/navigation';
|
||||
|
||||
import { createCmsClient } from '@kit/cms';
|
||||
|
||||
import { Post } from '~/(marketing)/blog/_components/post';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { Post } from '../../blog/_components/post';
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
|
||||
@@ -21,6 +21,7 @@ export function PostPreview({
|
||||
}: React.PropsWithChildren<Props>) {
|
||||
const { title, image, publishedAt, description } = post;
|
||||
const height = imageHeight ?? DEFAULT_IMAGE_HEIGHT;
|
||||
|
||||
const slug = `/blog/${post.slug}`;
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PostHeader } from './post-header';
|
||||
|
||||
export const Post: React.FC<{
|
||||
post: Cms.ContentItem;
|
||||
content: string;
|
||||
content: unknown;
|
||||
}> = ({ post, content }) => {
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user