diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index 16969dc..e4225ef 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -1,5 +1,4 @@ import { TinaMarkdown } from 'tinacms/dist/rich-text'; -import { tinaField } from "tinacms/dist/react"; // For development, we'll use static data until TinaCMS is fully configured export async function generateStaticParams() { @@ -21,7 +20,13 @@ export default async function BlogPost({ params }: { params: { slug: string } }) {new Date(post.date).toLocaleDateString()}
-
{post._body}
+
); diff --git a/tina/config.ts b/tina/config.ts index 8816f7c..ea1bfd0 100644 --- a/tina/config.ts +++ b/tina/config.ts @@ -8,6 +8,31 @@ export default defineConfig({ outputFolder: "admin", publicFolder: "public", }, + schema: { + collections: [ + { + name: "post", + label: "Blog Posts", + path: "content/posts", + format: "mdx", + fields: [ + { + type: "string", + name: "title", + label: "Title", + isTitle: true, + required: true, + }, + { + type: "rich-text", + name: "body", + label: "Body", + isBody: true, + }, + ], + }, + ], + }, media: { tina: { mediaRoot: "uploads",