Skip to content

Commit ca68900

Browse files
committed
updated schema. made two test pages.
1 parent cb4ef7e commit ca68900

File tree

10 files changed

+43
-33
lines changed

10 files changed

+43
-33
lines changed

.tina/__generated__/_graphql.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tina/__generated__/_schema.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tina/__generated__/frags.gql

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tina/__generated__/schema.gql

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tina/__generated__/types.ts

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tina/schema.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ const schema = defineSchema({
1313
label: "Page 1",
1414
fields: [
1515
{
16-
name: "body",
17-
label: "Main Content",
18-
type: "rich-text",
19-
isBody: true,
16+
name: "text",
17+
label: "Text",
18+
type: "string",
2019
},
2120
],
2221
},
@@ -30,10 +29,9 @@ const schema = defineSchema({
3029
type: "string",
3130
},
3231
{
33-
name: "body",
34-
label: "Main Content",
35-
type: "rich-text",
36-
isBody: true,
32+
name: "text",
33+
label: "Text",
34+
type: "string",
3735
},
3836
],
3937
},

content/page/home.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2-
template: home
3-
---
4-
Welcome to the barebones starter for TinaCMS!
2+
title: page title
3+
text: test
4+
_template: page2
5+
---

content/page/test.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
text: test
3+
_template: page1
4+
---
5+

content/page/test2.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: test 2
3+
text: asdf
4+
_template: page2
5+
---
6+

pages/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { staticRequest } from "tinacms";
2-
import { TinaMarkdown } from "tinacms/dist/rich-text";
32
import { Layout } from "../components/Layout";
43
import { useTina } from "tinacms/dist/edit-state";
54

65
const query = `{
76
page(relativePath: "home.mdx"){
8-
body
7+
title
8+
text
99
}
1010
}`;
1111

@@ -17,10 +17,10 @@ export default function Home(props) {
1717
data: props.data,
1818
});
1919

20-
const content = data.page.body;
20+
const content = data.page.title;
2121
return (
2222
<Layout>
23-
<TinaMarkdown content={content} />
23+
<h1>{content}</h1>
2424
</Layout>
2525
);
2626
}

0 commit comments

Comments
 (0)