From f5c427dd701fca2444abc8b678ca4741a59514b0 Mon Sep 17 00:00:00 2001 From: James Perkins Date: Sat, 5 Mar 2022 15:56:34 +0000 Subject: [PATCH] Prettier formatting --- .../.tina/__generated__/_graphql.json | 2 +- .../cms-tina/.tina/__generated__/_lookup.json | 6 +- .../cms-tina/.tina/__generated__/_schema.json | 59 +- .../cms-tina/.tina/__generated__/schema.gql | 70 +- .../cms-tina/.tina/__generated__/types.ts | 613 ++++++++++-------- examples/cms-tina/README.md | 4 +- examples/cms-tina/_posts/dynamic-routing.md | 2 +- examples/cms-tina/pages/_app.js | 1 - examples/cms-tina/pages/admin.js | 4 +- 9 files changed, 433 insertions(+), 328 deletions(-) diff --git a/examples/cms-tina/.tina/__generated__/_graphql.json b/examples/cms-tina/.tina/__generated__/_graphql.json index 3b3e6430fd22..4f7ac4cfe7ef 100644 --- a/examples/cms-tina/.tina/__generated__/_graphql.json +++ b/examples/cms-tina/.tina/__generated__/_graphql.json @@ -2069,4 +2069,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/cms-tina/.tina/__generated__/_lookup.json b/examples/cms-tina/.tina/__generated__/_lookup.json index 53ab1495c639..6e651b843207 100644 --- a/examples/cms-tina/.tina/__generated__/_lookup.json +++ b/examples/cms-tina/.tina/__generated__/_lookup.json @@ -2,9 +2,7 @@ "DocumentConnection": { "type": "DocumentConnection", "resolveType": "multiCollectionDocumentList", - "collections": [ - "posts" - ] + "collections": ["posts"] }, "Node": { "type": "Node", @@ -28,4 +26,4 @@ "resolveType": "collectionDocumentList", "collection": "posts" } -} \ No newline at end of file +} diff --git a/examples/cms-tina/.tina/__generated__/_schema.json b/examples/cms-tina/.tina/__generated__/_schema.json index bb6bb0cf53d2..46e9b5f5c4c1 100644 --- a/examples/cms-tina/.tina/__generated__/_schema.json +++ b/examples/cms-tina/.tina/__generated__/_schema.json @@ -16,37 +16,25 @@ "type": "string", "label": "Title", "name": "title", - "namespace": [ - "posts", - "title" - ] + "namespace": ["posts", "title"] }, { "type": "string", "label": "Excerpt", "name": "excerpt", - "namespace": [ - "posts", - "excerpt" - ] + "namespace": ["posts", "excerpt"] }, { "type": "string", "label": "Cover Image", "name": "coverImage", - "namespace": [ - "posts", - "coverImage" - ] + "namespace": ["posts", "coverImage"] }, { "type": "string", "label": "Date", "name": "date", - "namespace": [ - "posts", - "date" - ] + "namespace": ["posts", "date"] }, { "type": "object", @@ -57,27 +45,16 @@ "type": "string", "label": "Name", "name": "name", - "namespace": [ - "posts", - "author", - "name" - ] + "namespace": ["posts", "author", "name"] }, { "type": "string", "label": "Picture", "name": "picture", - "namespace": [ - "posts", - "author", - "picture" - ] + "namespace": ["posts", "author", "picture"] } ], - "namespace": [ - "posts", - "author" - ] + "namespace": ["posts", "author"] }, { "type": "object", @@ -88,17 +65,10 @@ "type": "string", "label": "Url", "name": "url", - "namespace": [ - "posts", - "ogImage", - "url" - ] + "namespace": ["posts", "ogImage", "url"] } ], - "namespace": [ - "posts", - "ogImage" - ] + "namespace": ["posts", "ogImage"] }, { "type": "string", @@ -108,15 +78,10 @@ "ui": { "component": "textarea" }, - "namespace": [ - "posts", - "body" - ] + "namespace": ["posts", "body"] } ], - "namespace": [ - "posts" - ] + "namespace": ["posts"] } ] -} \ No newline at end of file +} diff --git a/examples/cms-tina/.tina/__generated__/schema.gql b/examples/cms-tina/.tina/__generated__/schema.gql index 250e698cc5b5..42acbd89517d 100644 --- a/examples/cms-tina/.tina/__generated__/schema.gql +++ b/examples/cms-tina/.tina/__generated__/schema.gql @@ -1,8 +1,12 @@ # DO NOT MODIFY THIS FILE. This file is automatically generated by Tina -"""References another document, used as a foreign key""" +""" +References another document, used as a foreign key +""" scalar Reference -"""""" +""" + +""" scalar JSON type SystemInfo { @@ -23,12 +27,16 @@ type PageInfo { endCursor: String! } -"""""" +""" + +""" interface Node { id: ID! } -"""""" +""" + +""" interface Document { sys: SystemInfo id: ID! @@ -36,7 +44,9 @@ interface Document { values: JSON! } -"""A relay-compliant pagination connection""" +""" +A relay-compliant pagination connection +""" interface Connection { totalCount: Float! } @@ -46,10 +56,20 @@ type Query { getCollections: [Collection!]! node(id: String): Node! getDocument(collection: String, relativePath: String): DocumentNode! - getDocumentList(before: String, after: String, first: Float, last: Float): DocumentConnection! + getDocumentList( + before: String + after: String + first: Float + last: Float + ): DocumentConnection! getDocumentFields: JSON! getPostsDocument(relativePath: String): PostsDocument! - getPostsList(before: String, after: String, first: Float, last: Float): PostsConnection! + getPostsList( + before: String + after: String + first: Float + last: Float + ): PostsConnection! } type DocumentConnectionEdges { @@ -72,7 +92,12 @@ type Collection { matches: String templates: [JSON] fields: [JSON] - documents(before: String, after: String, first: Float, last: Float): DocumentConnection! + documents( + before: String + after: String + first: Float + last: Float + ): DocumentConnection! } union DocumentNode = PostsDocument @@ -117,11 +142,29 @@ type PostsConnection implements Connection { } type Mutation { - addPendingDocument(collection: String!, relativePath: String!, template: String): DocumentNode! - updateDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! - createDocument(collection: String, relativePath: String!, params: DocumentMutation!): DocumentNode! - updatePostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! - createPostsDocument(relativePath: String!, params: PostsMutation!): PostsDocument! + addPendingDocument( + collection: String! + relativePath: String! + template: String + ): DocumentNode! + updateDocument( + collection: String + relativePath: String! + params: DocumentMutation! + ): DocumentNode! + createDocument( + collection: String + relativePath: String! + params: DocumentMutation! + ): DocumentNode! + updatePostsDocument( + relativePath: String! + params: PostsMutation! + ): PostsDocument! + createPostsDocument( + relativePath: String! + params: PostsMutation! + ): PostsDocument! } input DocumentMutation { @@ -151,4 +194,3 @@ schema { query: Query mutation: Mutation } - \ No newline at end of file diff --git a/examples/cms-tina/.tina/__generated__/types.ts b/examples/cms-tina/.tina/__generated__/types.ts index de8de0062a45..8abb47270af4 100644 --- a/examples/cms-tina/.tina/__generated__/types.ts +++ b/examples/cms-tina/.tina/__generated__/types.ts @@ -1,344 +1,446 @@ //@ts-nocheck // DO NOT MODIFY THIS FILE. This file is automatically generated by Tina -import { gql } from 'tinacms'; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +import { gql } from 'tinacms' +export type Maybe = T | null +export type InputMaybe = Maybe +export type Exact = { + [K in keyof T]: T[K] +} +export type MakeOptional = Omit & + { [SubKey in K]?: Maybe } +export type MakeMaybe = Omit & + { [SubKey in K]: Maybe } /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: string + String: string + Boolean: boolean + Int: number + Float: number /** References another document, used as a foreign key */ - Reference: any; - JSON: any; -}; + Reference: any + JSON: any +} export type SystemInfo = { - __typename?: 'SystemInfo'; - filename: Scalars['String']; - basename: Scalars['String']; - breadcrumbs: Array; - path: Scalars['String']; - relativePath: Scalars['String']; - extension: Scalars['String']; - template: Scalars['String']; - collection: Collection; -}; - + __typename?: 'SystemInfo' + filename: Scalars['String'] + basename: Scalars['String'] + breadcrumbs: Array + path: Scalars['String'] + relativePath: Scalars['String'] + extension: Scalars['String'] + template: Scalars['String'] + collection: Collection +} export type SystemInfoBreadcrumbsArgs = { - excludeExtension?: InputMaybe; -}; + excludeExtension?: InputMaybe +} export type PageInfo = { - __typename?: 'PageInfo'; - hasPreviousPage: Scalars['Boolean']; - hasNextPage: Scalars['Boolean']; - startCursor: Scalars['String']; - endCursor: Scalars['String']; -}; + __typename?: 'PageInfo' + hasPreviousPage: Scalars['Boolean'] + hasNextPage: Scalars['Boolean'] + startCursor: Scalars['String'] + endCursor: Scalars['String'] +} export type Node = { - id: Scalars['ID']; -}; + id: Scalars['ID'] +} export type Document = { - sys?: Maybe; - id: Scalars['ID']; - form: Scalars['JSON']; - values: Scalars['JSON']; -}; + sys?: Maybe + id: Scalars['ID'] + form: Scalars['JSON'] + values: Scalars['JSON'] +} /** A relay-compliant pagination connection */ export type Connection = { - totalCount: Scalars['Float']; -}; + totalCount: Scalars['Float'] +} export type Query = { - __typename?: 'Query'; - getCollection: Collection; - getCollections: Array; - node: Node; - getDocument: DocumentNode; - getDocumentList: DocumentConnection; - getDocumentFields: Scalars['JSON']; - getPostsDocument: PostsDocument; - getPostsList: PostsConnection; -}; - + __typename?: 'Query' + getCollection: Collection + getCollections: Array + node: Node + getDocument: DocumentNode + getDocumentList: DocumentConnection + getDocumentFields: Scalars['JSON'] + getPostsDocument: PostsDocument + getPostsList: PostsConnection +} export type QueryGetCollectionArgs = { - collection?: InputMaybe; -}; - + collection?: InputMaybe +} export type QueryNodeArgs = { - id?: InputMaybe; -}; - + id?: InputMaybe +} export type QueryGetDocumentArgs = { - collection?: InputMaybe; - relativePath?: InputMaybe; -}; - + collection?: InputMaybe + relativePath?: InputMaybe +} export type QueryGetDocumentListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - + before?: InputMaybe + after?: InputMaybe + first?: InputMaybe + last?: InputMaybe +} export type QueryGetPostsDocumentArgs = { - relativePath?: InputMaybe; -}; - + relativePath?: InputMaybe +} export type QueryGetPostsListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; + before?: InputMaybe + after?: InputMaybe + first?: InputMaybe + last?: InputMaybe +} export type DocumentConnectionEdges = { - __typename?: 'DocumentConnectionEdges'; - cursor?: Maybe; - node?: Maybe; -}; + __typename?: 'DocumentConnectionEdges' + cursor?: Maybe + node?: Maybe +} export type DocumentConnection = Connection & { - __typename?: 'DocumentConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Float']; - edges?: Maybe>>; -}; + __typename?: 'DocumentConnection' + pageInfo?: Maybe + totalCount: Scalars['Float'] + edges?: Maybe>> +} export type Collection = { - __typename?: 'Collection'; - name: Scalars['String']; - slug: Scalars['String']; - label?: Maybe; - path: Scalars['String']; - format?: Maybe; - matches?: Maybe; - templates?: Maybe>>; - fields?: Maybe>>; - documents: DocumentConnection; -}; - + __typename?: 'Collection' + name: Scalars['String'] + slug: Scalars['String'] + label?: Maybe + path: Scalars['String'] + format?: Maybe + matches?: Maybe + templates?: Maybe>> + fields?: Maybe>> + documents: DocumentConnection +} export type CollectionDocumentsArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; + before?: InputMaybe + after?: InputMaybe + first?: InputMaybe + last?: InputMaybe +} -export type DocumentNode = PostsDocument; +export type DocumentNode = PostsDocument export type PostsAuthor = { - __typename?: 'PostsAuthor'; - name?: Maybe; - picture?: Maybe; -}; + __typename?: 'PostsAuthor' + name?: Maybe + picture?: Maybe +} export type PostsOgImage = { - __typename?: 'PostsOgImage'; - url?: Maybe; -}; + __typename?: 'PostsOgImage' + url?: Maybe +} export type Posts = { - __typename?: 'Posts'; - title?: Maybe; - excerpt?: Maybe; - coverImage?: Maybe; - date?: Maybe; - author?: Maybe; - ogImage?: Maybe; - body?: Maybe; -}; - -export type PostsDocument = Node & Document & { - __typename?: 'PostsDocument'; - id: Scalars['ID']; - sys: SystemInfo; - data: Posts; - form: Scalars['JSON']; - values: Scalars['JSON']; - dataJSON: Scalars['JSON']; -}; + __typename?: 'Posts' + title?: Maybe + excerpt?: Maybe + coverImage?: Maybe + date?: Maybe + author?: Maybe + ogImage?: Maybe + body?: Maybe +} + +export type PostsDocument = Node & + Document & { + __typename?: 'PostsDocument' + id: Scalars['ID'] + sys: SystemInfo + data: Posts + form: Scalars['JSON'] + values: Scalars['JSON'] + dataJSON: Scalars['JSON'] + } export type PostsConnectionEdges = { - __typename?: 'PostsConnectionEdges'; - cursor?: Maybe; - node?: Maybe; -}; + __typename?: 'PostsConnectionEdges' + cursor?: Maybe + node?: Maybe +} export type PostsConnection = Connection & { - __typename?: 'PostsConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Float']; - edges?: Maybe>>; -}; + __typename?: 'PostsConnection' + pageInfo?: Maybe + totalCount: Scalars['Float'] + edges?: Maybe>> +} export type Mutation = { - __typename?: 'Mutation'; - addPendingDocument: DocumentNode; - updateDocument: DocumentNode; - createDocument: DocumentNode; - updatePostsDocument: PostsDocument; - createPostsDocument: PostsDocument; -}; - + __typename?: 'Mutation' + addPendingDocument: DocumentNode + updateDocument: DocumentNode + createDocument: DocumentNode + updatePostsDocument: PostsDocument + createPostsDocument: PostsDocument +} export type MutationAddPendingDocumentArgs = { - collection: Scalars['String']; - relativePath: Scalars['String']; - template?: InputMaybe; -}; - + collection: Scalars['String'] + relativePath: Scalars['String'] + template?: InputMaybe +} export type MutationUpdateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; - params: DocumentMutation; -}; - + collection?: InputMaybe + relativePath: Scalars['String'] + params: DocumentMutation +} export type MutationCreateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; - params: DocumentMutation; -}; - + collection?: InputMaybe + relativePath: Scalars['String'] + params: DocumentMutation +} export type MutationUpdatePostsDocumentArgs = { - relativePath: Scalars['String']; - params: PostsMutation; -}; - + relativePath: Scalars['String'] + params: PostsMutation +} export type MutationCreatePostsDocumentArgs = { - relativePath: Scalars['String']; - params: PostsMutation; -}; + relativePath: Scalars['String'] + params: PostsMutation +} export type DocumentMutation = { - posts?: InputMaybe; -}; + posts?: InputMaybe +} export type PostsAuthorMutation = { - name?: InputMaybe; - picture?: InputMaybe; -}; + name?: InputMaybe + picture?: InputMaybe +} export type PostsOgImageMutation = { - url?: InputMaybe; -}; + url?: InputMaybe +} export type PostsMutation = { - title?: InputMaybe; - excerpt?: InputMaybe; - coverImage?: InputMaybe; - date?: InputMaybe; - author?: InputMaybe; - ogImage?: InputMaybe; - body?: InputMaybe; -}; + title?: InputMaybe + excerpt?: InputMaybe + coverImage?: InputMaybe + date?: InputMaybe + author?: InputMaybe + ogImage?: InputMaybe + body?: InputMaybe +} -export type PostsPartsFragment = { __typename?: 'Posts', title?: string | null, excerpt?: string | null, coverImage?: string | null, date?: string | null, body?: string | null, author?: { __typename: 'PostsAuthor', name?: string | null, picture?: string | null } | null, ogImage?: { __typename: 'PostsOgImage', url?: string | null } | null }; +export type PostsPartsFragment = { + __typename?: 'Posts' + title?: string | null + excerpt?: string | null + coverImage?: string | null + date?: string | null + body?: string | null + author?: { + __typename: 'PostsAuthor' + name?: string | null + picture?: string | null + } | null + ogImage?: { __typename: 'PostsOgImage'; url?: string | null } | null +} export type GetPostsDocumentQueryVariables = Exact<{ - relativePath: Scalars['String']; -}>; - - -export type GetPostsDocumentQuery = { __typename?: 'Query', getPostsDocument: { __typename?: 'PostsDocument', id: string, sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string }, data: { __typename?: 'Posts', title?: string | null, excerpt?: string | null, coverImage?: string | null, date?: string | null, body?: string | null, author?: { __typename: 'PostsAuthor', name?: string | null, picture?: string | null } | null, ogImage?: { __typename: 'PostsOgImage', url?: string | null } | null } } }; - -export type GetPostsListQueryVariables = Exact<{ [key: string]: never; }>; - + relativePath: Scalars['String'] +}> + +export type GetPostsDocumentQuery = { + __typename?: 'Query' + getPostsDocument: { + __typename?: 'PostsDocument' + id: string + sys: { + __typename?: 'SystemInfo' + filename: string + basename: string + breadcrumbs: Array + path: string + relativePath: string + extension: string + } + data: { + __typename?: 'Posts' + title?: string | null + excerpt?: string | null + coverImage?: string | null + date?: string | null + body?: string | null + author?: { + __typename: 'PostsAuthor' + name?: string | null + picture?: string | null + } | null + ogImage?: { __typename: 'PostsOgImage'; url?: string | null } | null + } + } +} -export type GetPostsListQuery = { __typename?: 'Query', getPostsList: { __typename?: 'PostsConnection', totalCount: number, edges?: Array<{ __typename?: 'PostsConnectionEdges', node?: { __typename?: 'PostsDocument', id: string, sys: { __typename?: 'SystemInfo', filename: string, basename: string, breadcrumbs: Array, path: string, relativePath: string, extension: string }, data: { __typename?: 'Posts', title?: string | null, excerpt?: string | null, coverImage?: string | null, date?: string | null, body?: string | null, author?: { __typename: 'PostsAuthor', name?: string | null, picture?: string | null } | null, ogImage?: { __typename: 'PostsOgImage', url?: string | null } | null } } | null } | null> | null } }; +export type GetPostsListQueryVariables = Exact<{ [key: string]: never }> + +export type GetPostsListQuery = { + __typename?: 'Query' + getPostsList: { + __typename?: 'PostsConnection' + totalCount: number + edges?: Array<{ + __typename?: 'PostsConnectionEdges' + node?: { + __typename?: 'PostsDocument' + id: string + sys: { + __typename?: 'SystemInfo' + filename: string + basename: string + breadcrumbs: Array + path: string + relativePath: string + extension: string + } + data: { + __typename?: 'Posts' + title?: string | null + excerpt?: string | null + coverImage?: string | null + date?: string | null + body?: string | null + author?: { + __typename: 'PostsAuthor' + name?: string | null + picture?: string | null + } | null + ogImage?: { __typename: 'PostsOgImage'; url?: string | null } | null + } + } | null + } | null> | null + } +} export const PostsPartsFragmentDoc = gql` - fragment PostsParts on Posts { - title - excerpt - coverImage - date - author { - __typename - name - picture - } - ogImage { - __typename - url + fragment PostsParts on Posts { + title + excerpt + coverImage + date + author { + __typename + name + picture + } + ogImage { + __typename + url + } + body } - body -} - `; +` export const GetPostsDocumentDocument = gql` - query getPostsDocument($relativePath: String!) { - getPostsDocument(relativePath: $relativePath) { - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id - data { - ...PostsParts + query getPostsDocument($relativePath: String!) { + getPostsDocument(relativePath: $relativePath) { + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + id + data { + ...PostsParts + } } } -} - ${PostsPartsFragmentDoc}`; + ${PostsPartsFragmentDoc} +` export const GetPostsListDocument = gql` - query getPostsList { - getPostsList { - totalCount - edges { - node { - id - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - data { - ...PostsParts + query getPostsList { + getPostsList { + totalCount + edges { + node { + id + sys { + filename + basename + breadcrumbs + path + relativePath + extension + } + data { + ...PostsParts + } } } } } -} - ${PostsPartsFragmentDoc}`; -export type Requester = (doc: DocumentNode, vars?: V, options?: C) => Promise - export function getSdk(requester: Requester) { - return { - getPostsDocument(variables: GetPostsDocumentQueryVariables, options?: C): Promise<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}> { - return requester<{data: GetPostsDocumentQuery, variables: GetPostsDocumentQueryVariables, query: string}, GetPostsDocumentQueryVariables>(GetPostsDocumentDocument, variables, options); - }, - getPostsList(variables?: GetPostsListQueryVariables, options?: C): Promise<{data: GetPostsListQuery, variables: GetPostsListQueryVariables, query: string}> { - return requester<{data: GetPostsListQuery, variables: GetPostsListQueryVariables, query: string}, GetPostsListQueryVariables>(GetPostsListDocument, variables, options); - } - }; + ${PostsPartsFragmentDoc} +` +export type Requester = ( + doc: DocumentNode, + vars?: V, + options?: C +) => Promise +export function getSdk(requester: Requester) { + return { + getPostsDocument( + variables: GetPostsDocumentQueryVariables, + options?: C + ): Promise<{ + data: GetPostsDocumentQuery + variables: GetPostsDocumentQueryVariables + query: string + }> { + return requester< + { + data: GetPostsDocumentQuery + variables: GetPostsDocumentQueryVariables + query: string + }, + GetPostsDocumentQueryVariables + >(GetPostsDocumentDocument, variables, options) + }, + getPostsList( + variables?: GetPostsListQueryVariables, + options?: C + ): Promise<{ + data: GetPostsListQuery + variables: GetPostsListQueryVariables + query: string + }> { + return requester< + { + data: GetPostsListQuery + variables: GetPostsListQueryVariables + query: string + }, + GetPostsListQueryVariables + >(GetPostsListDocument, variables, options) + }, } - export type Sdk = ReturnType; +} +export type Sdk = ReturnType // TinaSDK generated code import { staticRequest } from 'tinacms' @@ -365,5 +467,4 @@ const requester: (doc: any, vars?: any, options?: any) => Promise = async ( /** * @experimental this class can be used but may change in the future **/ -export const ExperimentalGetTinaClient = ()=>getSdk(requester) - +export const ExperimentalGetTinaClient = () => getSdk(requester) diff --git a/examples/cms-tina/README.md b/examples/cms-tina/README.md index bb992f8c0d4d..6f0b3efb5d94 100644 --- a/examples/cms-tina/README.md +++ b/examples/cms-tina/README.md @@ -53,7 +53,7 @@ Your blog should be up and running on [http://localhost:3000](http://localhost:3 Tina is git backed and uses markdown, JSON or MDX to power websites. To enter edit mode locally you just need to visit [http://localhost:3000/admin](http://localhost:3000/admin) -You can then select the collection "Blog Posts" and then the content you would like to edit. +You can then select the collection "Blog Posts" and then the content you would like to edit. Once you hit save, Tina will use our graphQL modify the content on your filesystem. @@ -68,7 +68,7 @@ To deploy your local project to Vercel, push it to GitHub. Once you have pushed 1. Select new project 2. Select Import your site 3. Follow steps to connect your GitHub repo. -4. Copy your Client ID +4. Copy your Client ID Then [import to Vercel](https://vercel.com/import/git?utm_source=github&utm_medium=readme&utm_campaign=next-example). diff --git a/examples/cms-tina/_posts/dynamic-routing.md b/examples/cms-tina/_posts/dynamic-routing.md index de3c40be6859..b6ef7a26e6ae 100644 --- a/examples/cms-tina/_posts/dynamic-routing.md +++ b/examples/cms-tina/_posts/dynamic-routing.md @@ -16,4 +16,4 @@ Venenatis cras sed felis eget velit. Consectetur libero id faucibus nisl tincidu ## Lorem Ipsum -Tristique senectus et netus et malesuada fames ac turpis. Ridiculous mus mauris vitae ultricies leo integer malesuada nunc vel. In mollis nunc sed id semper. Egestas tellus rutrum tellus pellentesque. Phasellus vestibulum lorem sed risus ultricies tristique nulla. Quis blandit turpis cursus in hac habitasse platea dictumst quisque. Eros donec ac odio tempor orci dapibus ultrices. Aliquam sem et tortor consequat id porta nibh. Adipiscing elit duis tristique sollicitudin nibh sit amet commodo nulla. Diam vulputate ut pharetra sit amet. Ut tellus elementum sagittis vitae et leo. Arcu non odio euismod lacinia at quis risus sed vulputate. \ No newline at end of file +Tristique senectus et netus et malesuada fames ac turpis. Ridiculous mus mauris vitae ultricies leo integer malesuada nunc vel. In mollis nunc sed id semper. Egestas tellus rutrum tellus pellentesque. Phasellus vestibulum lorem sed risus ultricies tristique nulla. Quis blandit turpis cursus in hac habitasse platea dictumst quisque. Eros donec ac odio tempor orci dapibus ultrices. Aliquam sem et tortor consequat id porta nibh. Adipiscing elit duis tristique sollicitudin nibh sit amet commodo nulla. Diam vulputate ut pharetra sit amet. Ut tellus elementum sagittis vitae et leo. Arcu non odio euismod lacinia at quis risus sed vulputate. diff --git a/examples/cms-tina/pages/_app.js b/examples/cms-tina/pages/_app.js index 50da290c3158..8ad946c7ebb1 100644 --- a/examples/cms-tina/pages/_app.js +++ b/examples/cms-tina/pages/_app.js @@ -10,4 +10,3 @@ const App = ({ Component, pageProps }) => { } export default App - diff --git a/examples/cms-tina/pages/admin.js b/examples/cms-tina/pages/admin.js index 5a9184250e14..edebe7a815a7 100644 --- a/examples/cms-tina/pages/admin.js +++ b/examples/cms-tina/pages/admin.js @@ -1,2 +1,2 @@ -import { TinaAdmin } from 'tinacms'; -export default TinaAdmin; +import { TinaAdmin } from 'tinacms' +export default TinaAdmin