create-tina-app 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -0
  3. package/bin/create-tina-app +2 -2
  4. package/dist/examples.d.ts +27 -0
  5. package/dist/index.js +180 -43
  6. package/examples/basic/.tina/__generated__/_graphql.json +2304 -0
  7. package/examples/basic/.tina/__generated__/_lookup.json +56 -0
  8. package/examples/basic/.tina/__generated__/_schema.json +57 -0
  9. package/examples/basic/.tina/__generated__/config/schema.json +38 -0
  10. package/examples/basic/.tina/__generated__/schema.gql +159 -0
  11. package/examples/basic/.tina/__generated__/types.ts +285 -0
  12. package/examples/basic/.tina/schema.ts +40 -0
  13. package/examples/basic/README.md +24 -0
  14. package/examples/basic/components/Layout.js +28 -0
  15. package/examples/basic/content/page/home.mdx +2 -0
  16. package/examples/basic/content/post/HelloWorld.md +7 -0
  17. package/examples/basic/next.config.js +1 -0
  18. package/examples/basic/package.json +23 -0
  19. package/examples/basic/pages/_app.js +33 -0
  20. package/examples/basic/pages/admin/[[...slug]].js +3 -0
  21. package/examples/basic/pages/index.js +30 -0
  22. package/examples/basic/pages/posts/[slug].js +64 -0
  23. package/examples/basic/pages/posts/index.js +44 -0
  24. package/examples/basic/public/favicon.ico +0 -0
  25. package/examples/basic/public/vercel.svg +4 -0
  26. package/examples/tina-tailwind-sidebar-demo/.tina/PageTemplate.ts +427 -0
  27. package/examples/tina-tailwind-sidebar-demo/.tina/ThemeTemplate.ts +42 -0
  28. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_graphql.json +4180 -0
  29. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_lookup.json +68 -0
  30. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/_schema.json +851 -0
  31. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/config/schema.json +479 -0
  32. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/schema.gql +391 -0
  33. package/examples/tina-tailwind-sidebar-demo/.tina/__generated__/types.ts +520 -0
  34. package/examples/tina-tailwind-sidebar-demo/.tina/schema.ts +35 -0
  35. package/examples/tina-tailwind-sidebar-demo/CHANGELOG.md +95 -0
  36. package/examples/tina-tailwind-sidebar-demo/LICENSE +201 -0
  37. package/examples/tina-tailwind-sidebar-demo/README.md +10 -0
  38. package/examples/tina-tailwind-sidebar-demo/components/PageBlocks.tsx +25 -0
  39. package/examples/tina-tailwind-sidebar-demo/components/actions.js +114 -0
  40. package/examples/tina-tailwind-sidebar-demo/components/features.tsx +171 -0
  41. package/examples/tina-tailwind-sidebar-demo/components/footer.tsx +247 -0
  42. package/examples/tina-tailwind-sidebar-demo/components/hero.js +156 -0
  43. package/examples/tina-tailwind-sidebar-demo/components/icon.js +264 -0
  44. package/examples/tina-tailwind-sidebar-demo/components/modal.js +79 -0
  45. package/examples/tina-tailwind-sidebar-demo/components/nav.tsx +121 -0
  46. package/examples/tina-tailwind-sidebar-demo/components/section.js +53 -0
  47. package/examples/tina-tailwind-sidebar-demo/components/testimonial.tsx +87 -0
  48. package/examples/tina-tailwind-sidebar-demo/components/theme.tsx +81 -0
  49. package/examples/tina-tailwind-sidebar-demo/components/tina-wrapper.js +85 -0
  50. package/examples/tina-tailwind-sidebar-demo/content/data/homepage.json +186 -0
  51. package/examples/tina-tailwind-sidebar-demo/content/theme/NormalTheme.json +5 -0
  52. package/examples/tina-tailwind-sidebar-demo/graphql.config.js +24 -0
  53. package/examples/tina-tailwind-sidebar-demo/next-env.d.ts +15 -0
  54. package/examples/tina-tailwind-sidebar-demo/package.json +42 -0
  55. package/examples/tina-tailwind-sidebar-demo/pages/_app.js +48 -0
  56. package/examples/tina-tailwind-sidebar-demo/pages/admin.tsx +26 -0
  57. package/examples/tina-tailwind-sidebar-demo/pages/index.tsx +186 -0
  58. package/examples/tina-tailwind-sidebar-demo/postcss.config.js +19 -0
  59. package/examples/tina-tailwind-sidebar-demo/public/canal.jpg +0 -0
  60. package/examples/tina-tailwind-sidebar-demo/public/index.html +42 -0
  61. package/examples/tina-tailwind-sidebar-demo/styles.css +20 -0
  62. package/examples/tina-tailwind-sidebar-demo/tailwind.config.js +83 -0
  63. package/examples/tina-tailwind-sidebar-demo/tsconfig.json +19 -0
  64. package/package.json +7 -3
@@ -0,0 +1,56 @@
1
+ {
2
+ "DocumentConnection": {
3
+ "type": "DocumentConnection",
4
+ "resolveType": "multiCollectionDocumentList",
5
+ "collections": [
6
+ "page",
7
+ "post"
8
+ ]
9
+ },
10
+ "Node": {
11
+ "type": "Node",
12
+ "resolveType": "nodeDocument"
13
+ },
14
+ "DocumentNode": {
15
+ "type": "DocumentNode",
16
+ "resolveType": "multiCollectionDocument",
17
+ "createDocument": "create",
18
+ "updateDocument": "update"
19
+ },
20
+ "PostsDocument": {
21
+ "type": "PostsDocument",
22
+ "resolveType": "collectionDocument",
23
+ "collection": "posts",
24
+ "createPostsDocument": "create",
25
+ "updatePostsDocument": "update"
26
+ },
27
+ "PostsConnection": {
28
+ "type": "PostsConnection",
29
+ "resolveType": "collectionDocumentList",
30
+ "collection": "posts"
31
+ },
32
+ "PageDocument": {
33
+ "type": "PageDocument",
34
+ "resolveType": "collectionDocument",
35
+ "collection": "page",
36
+ "createPageDocument": "create",
37
+ "updatePageDocument": "update"
38
+ },
39
+ "PageConnection": {
40
+ "type": "PageConnection",
41
+ "resolveType": "collectionDocumentList",
42
+ "collection": "page"
43
+ },
44
+ "PostDocument": {
45
+ "type": "PostDocument",
46
+ "resolveType": "collectionDocument",
47
+ "collection": "post",
48
+ "createPostDocument": "create",
49
+ "updatePostDocument": "update"
50
+ },
51
+ "PostConnection": {
52
+ "type": "PostConnection",
53
+ "resolveType": "collectionDocumentList",
54
+ "collection": "post"
55
+ }
56
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "collections": [
3
+ {
4
+ "label": "Page Content",
5
+ "name": "page",
6
+ "path": "content/page",
7
+ "fields": [
8
+ {
9
+ "name": "body",
10
+ "label": "Main Content",
11
+ "type": "rich-text",
12
+ "isBody": true,
13
+ "namespace": [
14
+ "page",
15
+ "body"
16
+ ]
17
+ }
18
+ ],
19
+ "namespace": [
20
+ "page"
21
+ ]
22
+ },
23
+ {
24
+ "label": "Blog Posts",
25
+ "name": "post",
26
+ "path": "content/post",
27
+ "fields": [
28
+ {
29
+ "type": "string",
30
+ "label": "Title",
31
+ "name": "title",
32
+ "namespace": [
33
+ "post",
34
+ "title"
35
+ ]
36
+ },
37
+ {
38
+ "type": "string",
39
+ "label": "Blog Post Body",
40
+ "name": "body",
41
+ "isBody": true,
42
+ "ui": {
43
+ "component": "textarea"
44
+ },
45
+ "namespace": [
46
+ "post",
47
+ "body"
48
+ ]
49
+ }
50
+ ],
51
+ "namespace": [
52
+ "post"
53
+ ]
54
+ }
55
+ ],
56
+ "namespace": []
57
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "collections": [
3
+ {
4
+ "label": "Page Content",
5
+ "name": "page",
6
+ "path": "content/page",
7
+ "fields": [
8
+ {
9
+ "name": "body",
10
+ "label": "Main Content",
11
+ "type": "rich-text",
12
+ "isBody": true
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "label": "Blog Posts",
18
+ "name": "post",
19
+ "path": "content/post",
20
+ "fields": [
21
+ {
22
+ "type": "string",
23
+ "label": "Title",
24
+ "name": "title"
25
+ },
26
+ {
27
+ "type": "string",
28
+ "label": "Blog Post Body",
29
+ "name": "body",
30
+ "isBody": true,
31
+ "ui": {
32
+ "component": "textarea"
33
+ }
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,159 @@
1
+ # DO NOT MODIFY THIS FILE. This file is automatically generated by Tina
2
+ """References another document, used as a foreign key"""
3
+ scalar Reference
4
+
5
+ """"""
6
+ scalar JSON
7
+
8
+ type SystemInfo {
9
+ filename: String!
10
+ basename: String!
11
+ breadcrumbs(excludeExtension: Boolean): [String!]!
12
+ path: String!
13
+ relativePath: String!
14
+ extension: String!
15
+ template: String!
16
+ collection: Collection!
17
+ }
18
+
19
+ type PageInfo {
20
+ hasPreviousPage: Boolean!
21
+ hasNextPage: Boolean!
22
+ startCursor: String!
23
+ endCursor: String!
24
+ }
25
+
26
+ """"""
27
+ interface Node {
28
+ id: ID!
29
+ }
30
+
31
+ """"""
32
+ interface Document {
33
+ sys: SystemInfo
34
+ id: ID!
35
+ form: JSON!
36
+ values: JSON!
37
+ }
38
+
39
+ """A relay-compliant pagination connection"""
40
+ interface Connection {
41
+ totalCount: Int!
42
+ }
43
+
44
+ type Query {
45
+ getCollection(collection: String): Collection!
46
+ getCollections: [Collection!]!
47
+ node(id: String): Node!
48
+ getDocument(collection: String, relativePath: String): DocumentNode!
49
+ getDocumentList(before: String, after: String, first: Int, last: Int): DocumentConnection!
50
+ getDocumentFields: JSON!
51
+ getPageDocument(relativePath: String): PageDocument!
52
+ getPageList(before: String, after: String, first: Int, last: Int): PageConnection!
53
+ getPostDocument(relativePath: String): PostDocument!
54
+ getPostList(before: String, after: String, first: Int, last: Int): PostConnection!
55
+ }
56
+
57
+ type DocumentConnectionEdges {
58
+ cursor: String
59
+ node: DocumentNode
60
+ }
61
+
62
+ type DocumentConnection implements Connection {
63
+ pageInfo: PageInfo
64
+ totalCount: Int!
65
+ edges: [DocumentConnectionEdges]
66
+ }
67
+
68
+ type Collection {
69
+ name: String!
70
+ slug: String!
71
+ label: String!
72
+ path: String!
73
+ format: String
74
+ matches: String
75
+ templates: [JSON]
76
+ fields: [JSON]
77
+ documents(before: String, after: String, first: Int, last: Int): DocumentConnection!
78
+ }
79
+
80
+ union DocumentNode = PageDocument | PostDocument
81
+
82
+ type Page {
83
+ body: JSON
84
+ }
85
+
86
+ type PageDocument implements Node & Document {
87
+ id: ID!
88
+ sys: SystemInfo!
89
+ data: Page!
90
+ form: JSON!
91
+ values: JSON!
92
+ dataJSON: JSON!
93
+ }
94
+
95
+ type PageConnectionEdges {
96
+ cursor: String
97
+ node: PageDocument
98
+ }
99
+
100
+ type PageConnection implements Connection {
101
+ pageInfo: PageInfo
102
+ totalCount: Int!
103
+ edges: [PageConnectionEdges]
104
+ }
105
+
106
+ type Post {
107
+ title: String
108
+ body: String
109
+ }
110
+
111
+ type PostDocument implements Node & Document {
112
+ id: ID!
113
+ sys: SystemInfo!
114
+ data: Post!
115
+ form: JSON!
116
+ values: JSON!
117
+ dataJSON: JSON!
118
+ }
119
+
120
+ type PostConnectionEdges {
121
+ cursor: String
122
+ node: PostDocument
123
+ }
124
+
125
+ type PostConnection implements Connection {
126
+ pageInfo: PageInfo
127
+ totalCount: Int!
128
+ edges: [PostConnectionEdges]
129
+ }
130
+
131
+ type Mutation {
132
+ addPendingDocument(collection: String!, relativePath: String!, template: String): DocumentNode!
133
+ updateDocument(relativePath: String!, params: DocumentMutation!): DocumentNode!
134
+ createDocument(relativePath: String!, params: DocumentMutation!): DocumentNode!
135
+ updatePageDocument(relativePath: String!, params: PageMutation!): PageDocument!
136
+ createPageDocument(relativePath: String!, params: PageMutation!): PageDocument!
137
+ updatePostDocument(relativePath: String!, params: PostMutation!): PostDocument!
138
+ createPostDocument(relativePath: String!, params: PostMutation!): PostDocument!
139
+ }
140
+
141
+ input DocumentMutation {
142
+ page: PageMutation
143
+ post: PostMutation
144
+ }
145
+
146
+ input PageMutation {
147
+ body: JSON
148
+ }
149
+
150
+ input PostMutation {
151
+ title: String
152
+ body: String
153
+ }
154
+
155
+ schema {
156
+ query: Query
157
+ mutation: Mutation
158
+ }
159
+
@@ -0,0 +1,285 @@
1
+ // DO NOT MODIFY THIS FILE. This file is automatically generated by Tina
2
+ export type Maybe<T> = T | null;
3
+ export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
4
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
5
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
6
+ /** All built-in and custom scalars, mapped to their actual values */
7
+ export type Scalars = {
8
+ ID: string;
9
+ String: string;
10
+ Boolean: boolean;
11
+ Int: number;
12
+ Float: number;
13
+ /** References another document, used as a foreign key */
14
+ Reference: any;
15
+ JSON: any;
16
+ };
17
+
18
+
19
+
20
+ export type SystemInfo = {
21
+ __typename?: 'SystemInfo';
22
+ filename: Scalars['String'];
23
+ basename: Scalars['String'];
24
+ breadcrumbs: Array<Scalars['String']>;
25
+ path: Scalars['String'];
26
+ relativePath: Scalars['String'];
27
+ extension: Scalars['String'];
28
+ template: Scalars['String'];
29
+ collection: Collection;
30
+ };
31
+
32
+
33
+ export type SystemInfoBreadcrumbsArgs = {
34
+ excludeExtension?: Maybe<Scalars['Boolean']>;
35
+ };
36
+
37
+ export type PageInfo = {
38
+ __typename?: 'PageInfo';
39
+ hasPreviousPage: Scalars['Boolean'];
40
+ hasNextPage: Scalars['Boolean'];
41
+ startCursor: Scalars['String'];
42
+ endCursor: Scalars['String'];
43
+ };
44
+
45
+ export type Node = {
46
+ id: Scalars['ID'];
47
+ };
48
+
49
+ export type Document = {
50
+ sys?: Maybe<SystemInfo>;
51
+ id: Scalars['ID'];
52
+ form: Scalars['JSON'];
53
+ values: Scalars['JSON'];
54
+ };
55
+
56
+ /** A relay-compliant pagination connection */
57
+ export type Connection = {
58
+ totalCount: Scalars['Int'];
59
+ };
60
+
61
+ export type Query = {
62
+ __typename?: 'Query';
63
+ getCollection: Collection;
64
+ getCollections: Array<Collection>;
65
+ node: Node;
66
+ getDocument: DocumentNode;
67
+ getDocumentList: DocumentConnection;
68
+ getDocumentFields: Scalars['JSON'];
69
+ getPageDocument: PageDocument;
70
+ getPageList: PageConnection;
71
+ getPostDocument: PostDocument;
72
+ getPostList: PostConnection;
73
+ };
74
+
75
+
76
+ export type QueryGetCollectionArgs = {
77
+ collection?: Maybe<Scalars['String']>;
78
+ };
79
+
80
+
81
+ export type QueryNodeArgs = {
82
+ id?: Maybe<Scalars['String']>;
83
+ };
84
+
85
+
86
+ export type QueryGetDocumentArgs = {
87
+ collection?: Maybe<Scalars['String']>;
88
+ relativePath?: Maybe<Scalars['String']>;
89
+ };
90
+
91
+
92
+ export type QueryGetDocumentListArgs = {
93
+ before?: Maybe<Scalars['String']>;
94
+ after?: Maybe<Scalars['String']>;
95
+ first?: Maybe<Scalars['Int']>;
96
+ last?: Maybe<Scalars['Int']>;
97
+ };
98
+
99
+
100
+ export type QueryGetPageDocumentArgs = {
101
+ relativePath?: Maybe<Scalars['String']>;
102
+ };
103
+
104
+
105
+ export type QueryGetPageListArgs = {
106
+ before?: Maybe<Scalars['String']>;
107
+ after?: Maybe<Scalars['String']>;
108
+ first?: Maybe<Scalars['Int']>;
109
+ last?: Maybe<Scalars['Int']>;
110
+ };
111
+
112
+
113
+ export type QueryGetPostDocumentArgs = {
114
+ relativePath?: Maybe<Scalars['String']>;
115
+ };
116
+
117
+
118
+ export type QueryGetPostListArgs = {
119
+ before?: Maybe<Scalars['String']>;
120
+ after?: Maybe<Scalars['String']>;
121
+ first?: Maybe<Scalars['Int']>;
122
+ last?: Maybe<Scalars['Int']>;
123
+ };
124
+
125
+ export type DocumentConnectionEdges = {
126
+ __typename?: 'DocumentConnectionEdges';
127
+ cursor?: Maybe<Scalars['String']>;
128
+ node?: Maybe<DocumentNode>;
129
+ };
130
+
131
+ export type DocumentConnection = Connection & {
132
+ __typename?: 'DocumentConnection';
133
+ pageInfo?: Maybe<PageInfo>;
134
+ totalCount: Scalars['Int'];
135
+ edges?: Maybe<Array<Maybe<DocumentConnectionEdges>>>;
136
+ };
137
+
138
+ export type Collection = {
139
+ __typename?: 'Collection';
140
+ name: Scalars['String'];
141
+ slug: Scalars['String'];
142
+ label: Scalars['String'];
143
+ path: Scalars['String'];
144
+ format?: Maybe<Scalars['String']>;
145
+ matches?: Maybe<Scalars['String']>;
146
+ templates?: Maybe<Array<Maybe<Scalars['JSON']>>>;
147
+ fields?: Maybe<Array<Maybe<Scalars['JSON']>>>;
148
+ documents: DocumentConnection;
149
+ };
150
+
151
+
152
+ export type CollectionDocumentsArgs = {
153
+ before?: Maybe<Scalars['String']>;
154
+ after?: Maybe<Scalars['String']>;
155
+ first?: Maybe<Scalars['Int']>;
156
+ last?: Maybe<Scalars['Int']>;
157
+ };
158
+
159
+ export type DocumentNode = PageDocument | PostDocument;
160
+
161
+ export type Page = {
162
+ __typename?: 'Page';
163
+ body?: Maybe<Scalars['JSON']>;
164
+ };
165
+
166
+ export type PageDocument = Node & Document & {
167
+ __typename?: 'PageDocument';
168
+ id: Scalars['ID'];
169
+ sys: SystemInfo;
170
+ data: Page;
171
+ form: Scalars['JSON'];
172
+ values: Scalars['JSON'];
173
+ dataJSON: Scalars['JSON'];
174
+ };
175
+
176
+ export type PageConnectionEdges = {
177
+ __typename?: 'PageConnectionEdges';
178
+ cursor?: Maybe<Scalars['String']>;
179
+ node?: Maybe<PageDocument>;
180
+ };
181
+
182
+ export type PageConnection = Connection & {
183
+ __typename?: 'PageConnection';
184
+ pageInfo?: Maybe<PageInfo>;
185
+ totalCount: Scalars['Int'];
186
+ edges?: Maybe<Array<Maybe<PageConnectionEdges>>>;
187
+ };
188
+
189
+ export type Post = {
190
+ __typename?: 'Post';
191
+ title?: Maybe<Scalars['String']>;
192
+ body?: Maybe<Scalars['String']>;
193
+ };
194
+
195
+ export type PostDocument = Node & Document & {
196
+ __typename?: 'PostDocument';
197
+ id: Scalars['ID'];
198
+ sys: SystemInfo;
199
+ data: Post;
200
+ form: Scalars['JSON'];
201
+ values: Scalars['JSON'];
202
+ dataJSON: Scalars['JSON'];
203
+ };
204
+
205
+ export type PostConnectionEdges = {
206
+ __typename?: 'PostConnectionEdges';
207
+ cursor?: Maybe<Scalars['String']>;
208
+ node?: Maybe<PostDocument>;
209
+ };
210
+
211
+ export type PostConnection = Connection & {
212
+ __typename?: 'PostConnection';
213
+ pageInfo?: Maybe<PageInfo>;
214
+ totalCount: Scalars['Int'];
215
+ edges?: Maybe<Array<Maybe<PostConnectionEdges>>>;
216
+ };
217
+
218
+ export type Mutation = {
219
+ __typename?: 'Mutation';
220
+ addPendingDocument: DocumentNode;
221
+ updateDocument: DocumentNode;
222
+ createDocument: DocumentNode;
223
+ updatePageDocument: PageDocument;
224
+ createPageDocument: PageDocument;
225
+ updatePostDocument: PostDocument;
226
+ createPostDocument: PostDocument;
227
+ };
228
+
229
+
230
+ export type MutationAddPendingDocumentArgs = {
231
+ collection: Scalars['String'];
232
+ relativePath: Scalars['String'];
233
+ template?: Maybe<Scalars['String']>;
234
+ };
235
+
236
+
237
+ export type MutationUpdateDocumentArgs = {
238
+ relativePath: Scalars['String'];
239
+ params: DocumentMutation;
240
+ };
241
+
242
+
243
+ export type MutationCreateDocumentArgs = {
244
+ relativePath: Scalars['String'];
245
+ params: DocumentMutation;
246
+ };
247
+
248
+
249
+ export type MutationUpdatePageDocumentArgs = {
250
+ relativePath: Scalars['String'];
251
+ params: PageMutation;
252
+ };
253
+
254
+
255
+ export type MutationCreatePageDocumentArgs = {
256
+ relativePath: Scalars['String'];
257
+ params: PageMutation;
258
+ };
259
+
260
+
261
+ export type MutationUpdatePostDocumentArgs = {
262
+ relativePath: Scalars['String'];
263
+ params: PostMutation;
264
+ };
265
+
266
+
267
+ export type MutationCreatePostDocumentArgs = {
268
+ relativePath: Scalars['String'];
269
+ params: PostMutation;
270
+ };
271
+
272
+ export type DocumentMutation = {
273
+ page?: Maybe<PageMutation>;
274
+ post?: Maybe<PostMutation>;
275
+ };
276
+
277
+ export type PageMutation = {
278
+ body?: Maybe<Scalars['JSON']>;
279
+ };
280
+
281
+ export type PostMutation = {
282
+ title?: Maybe<Scalars['String']>;
283
+ body?: Maybe<Scalars['String']>;
284
+ };
285
+
@@ -0,0 +1,40 @@
1
+ import { defineSchema } from '@tinacms/cli'
2
+
3
+ export default defineSchema({
4
+ collections: [
5
+ {
6
+ label: 'Page Content',
7
+ name: 'page',
8
+ path: 'content/page',
9
+ fields: [
10
+ {
11
+ name: 'body',
12
+ label: 'Main Content',
13
+ type: 'rich-text',
14
+ isBody: true,
15
+ },
16
+ ],
17
+ },
18
+ {
19
+ label: 'Blog Posts',
20
+ name: 'post',
21
+ path: 'content/post',
22
+ fields: [
23
+ {
24
+ type: 'string',
25
+ label: 'Title',
26
+ name: 'title',
27
+ },
28
+ {
29
+ type: 'string',
30
+ label: 'Blog Post Body',
31
+ name: 'body',
32
+ isBody: true,
33
+ ui: {
34
+ component: 'textarea',
35
+ },
36
+ },
37
+ ],
38
+ },
39
+ ],
40
+ })
@@ -0,0 +1,24 @@
1
+ This is a [Tina CMS](https://tina.io/) project.
2
+ ## Getting Started
3
+
4
+ First, run the development server:
5
+
6
+ ```bash
7
+ npm run dev
8
+ # or
9
+ yarn dev
10
+ ```
11
+
12
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
13
+
14
+ ## Learn More
15
+
16
+ To learn more about Tina, take a look at the following resources:
17
+
18
+ - [Tina Docs](https://tina.io/docs)
19
+ - [Getting starter guide](https://tina.io/guides/tina-cloud/starter/overview/)
20
+
21
+
22
+ You can check out [Tina Github repository](https://github.com/tinacms/tinacms) - your feedback and contributions are welcome!
23
+
24
+ ## [Deploy on Vercel](https://tina.io/guides/tina-cloud/add-tinacms-to-existing-site/deployment/)
@@ -0,0 +1,28 @@
1
+ import Link from 'next/link'
2
+ import Head from 'next/head'
3
+
4
+ export const Layout = (props) => {
5
+ return (
6
+ <div
7
+ style={{
8
+ margin: '3rem',
9
+ }}
10
+ >
11
+ <Head>
12
+ <title>Tina App</title>
13
+ <meta name="description" content="A TinaCMS Application" />
14
+ <link rel="icon" href="/favicon.ico" />
15
+ </Head>
16
+ <header>
17
+ <Link href="/">
18
+ <a>Home</a>
19
+ </Link>
20
+ {' | '}
21
+ <Link href="/posts">
22
+ <a>Posts</a>
23
+ </Link>
24
+ </header>
25
+ <main>{props.children}</main>
26
+ </div>
27
+ )
28
+ }
@@ -0,0 +1,2 @@
1
+
2
+ this is a test!
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: This is a title
3
+ ---
4
+
5
+ This is a test
6
+
7
+ How are you doing?
@@ -0,0 +1 @@
1
+ module.exports = {}