mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 11:58:23 +01:00
fix: update TinaCMS configuration and blog page types
Co-Authored-By: G <butaeff@gmail.com>
This commit is contained in:
1 parent
a10353a0bc
commit
3e062f5032
2 files changed
+32
-2
No files matched your search
@@ -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()}
|
||||
</time>
|
||||
<div className="prose prose-lg">
|
||||
<div {...tinaField(post, '_body')}>{post._body}</div>
|
||||
<TinaMarkdown content={{
|
||||
type: 'root',
|
||||
children: [{
|
||||
type: 'paragraph',
|
||||
children: [{ type: 'text', text: post._body }]
|
||||
}]
|
||||
}} />
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user