diff --git a/.tina/__generated__/.gitignore b/.tina/__generated__/.gitignore deleted file mode 100644 index 5baa59d64..000000000 --- a/.tina/__generated__/.gitignore +++ /dev/null @@ -1 +0,0 @@ -db \ No newline at end of file diff --git a/.tina/__generated__/_graphql.json b/.tina/__generated__/_graphql.json deleted file mode 100644 index f0770072c..000000000 --- a/.tina/__generated__/_graphql.json +++ /dev/null @@ -1,1916 +0,0 @@ -{ - "kind": "Document", - "definitions": [ - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "Reference" - }, - "description": { - "kind": "StringValue", - "value": "References another document, used as a foreign key" - }, - "directives": [] - }, - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "JSON" - }, - "description": { - "kind": "StringValue", - "value": "" - }, - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "SystemInfo" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "filename" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "basename" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "breadcrumbs" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "excludeExtension" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "path" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "extension" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "template" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "PageInfo" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "hasPreviousPage" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "hasNextPage" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "startCursor" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "endCursor" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "" - }, - "name": { - "kind": "Name", - "value": "Node" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "" - }, - "name": { - "kind": "Name", - "value": "Document" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "sys" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "SystemInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "form" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "values" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - } - ] - }, - { - "kind": "InterfaceTypeDefinition", - "description": { - "kind": "StringValue", - "value": "A relay-compliant pagination connection" - }, - "name": { - "kind": "Name", - "value": "Connection" - }, - "interfaces": [], - "directives": [], - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Query" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getCollection" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getCollections" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Collection" - } - } - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Node" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocumentList" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnection" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getDocumentFields" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getPostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "getPostsList" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsConnection" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "DocumentConnectionEdges" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "cursor" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Connection" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "DocumentConnection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "pageInfo" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PageInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "edges" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnectionEdges" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Collection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "name" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "slug" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "label" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "path" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "format" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "matches" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "templates" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "fields" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "documents" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "before" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "after" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "last" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentConnection" - } - } - } - } - ] - }, - { - "kind": "UnionTypeDefinition", - "name": { - "kind": "Name", - "value": "DocumentNode" - }, - "directives": [], - "types": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Posts" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "title" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "description" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "date" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "tags" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "imageUrl" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "body" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Node" - } - }, - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Document" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsDocument" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "sys" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "SystemInfo" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "data" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Posts" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "form" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "values" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "dataJSON" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsConnectionEdges" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "cursor" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "node" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [ - { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Connection" - } - } - ], - "directives": [], - "name": { - "kind": "Name", - "value": "PostsConnection" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "pageInfo" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PageInfo" - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "totalCount" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "edges" - }, - "arguments": [], - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsConnectionEdges" - } - } - } - } - ] - }, - { - "kind": "ObjectTypeDefinition", - "interfaces": [], - "directives": [], - "name": { - "kind": "Name", - "value": "Mutation" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "addPendingDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "template" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "updateDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "createDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "collection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DocumentNode" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "updatePostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "createPostsDocument" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "relativePath" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "params" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsDocument" - } - } - } - } - ] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "DocumentMutation" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "posts" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "PostsMutation" - } - } - } - ] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "PostsMutation" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "title" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "description" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "date" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tags" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "imageUrl" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "body" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "JSON" - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/.tina/__generated__/_lookup.json b/.tina/__generated__/_lookup.json deleted file mode 100644 index 53ab1495c..000000000 --- a/.tina/__generated__/_lookup.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "DocumentConnection": { - "type": "DocumentConnection", - "resolveType": "multiCollectionDocumentList", - "collections": [ - "posts" - ] - }, - "Node": { - "type": "Node", - "resolveType": "nodeDocument" - }, - "DocumentNode": { - "type": "DocumentNode", - "resolveType": "multiCollectionDocument", - "createDocument": "create", - "updateDocument": "update" - }, - "PostsDocument": { - "type": "PostsDocument", - "resolveType": "collectionDocument", - "collection": "posts", - "createPostsDocument": "create", - "updatePostsDocument": "update" - }, - "PostsConnection": { - "type": "PostsConnection", - "resolveType": "collectionDocumentList", - "collection": "posts" - } -} \ No newline at end of file diff --git a/.tina/__generated__/_schema.json b/.tina/__generated__/_schema.json deleted file mode 100644 index a29551317..000000000 --- a/.tina/__generated__/_schema.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "version": { - "fullVersion": "0.59.3", - "major": "0", - "minor": "59", - "patch": "3" - }, - "meta": {}, - "collections": [ - { - "label": "Blog Posts", - "name": "posts", - "path": "posts", - "fields": [ - { - "type": "string", - "label": "Title", - "name": "title", - "namespace": [ - "posts", - "title" - ] - }, - { - "type": "string", - "label": "Description", - "name": "description", - "namespace": [ - "posts", - "description" - ] - }, - { - "type": "string", - "label": "Date", - "name": "date", - "namespace": [ - "posts", - "date" - ] - }, - { - "type": "string", - "label": "Tags", - "name": "tags", - "namespace": [ - "posts", - "tags" - ] - }, - { - "type": "string", - "label": "Image URL", - "name": "imageUrl", - "namespace": [ - "posts", - "imageUrl" - ] - }, - { - "type": "rich-text", - "label": "Blog Post Body", - "name": "body", - "isBody": true, - "templates": [ - { - "name": "Quote", - "label": "Quote", - "fields": [ - { - "type": "string", - "name": "content", - "label": "Content", - "namespace": [ - "posts", - "body", - "Quote", - "content" - ] - }, - { - "type": "string", - "name": "author", - "label": "Author", - "namespace": [ - "posts", - "body", - "Quote", - "author" - ] - }, - { - "type": "string", - "name": "cite", - "label": "Cite", - "namespace": [ - "posts", - "body", - "Quote", - "cite" - ] - } - ], - "namespace": [ - "posts", - "body", - "Quote" - ] - }, - { - "name": "ArticleImage", - "label": "ArticleImage", - "fields": [ - { - "type": "string", - "name": "src", - "label": "Src", - "namespace": [ - "posts", - "body", - "ArticleImage", - "src" - ] - }, - { - "type": "string", - "name": "caption", - "label": "Caption", - "namespace": [ - "posts", - "body", - "ArticleImage", - "caption" - ] - } - ], - "namespace": [ - "posts", - "body", - "ArticleImage" - ] - }, - { - "name": "Code", - "label": "Code", - "fields": [ - { - "type": "string", - "name": "code", - "label": "Code", - "namespace": [ - "posts", - "body", - "Code", - "code" - ] - }, - { - "type": "string", - "name": "language", - "label": "Language", - "namespace": [ - "posts", - "body", - "Code", - "language" - ] - }, - { - "type": "string", - "name": "selectedLines", - "label": "Selected Lines", - "namespace": [ - "posts", - "body", - "Code", - "selectedLines" - ] - }, - { - "type": "boolean", - "name": "withCopyButton", - "label": "With Copy Button", - "namespace": [ - "posts", - "body", - "Code", - "withCopyButton" - ] - }, - { - "type": "boolean", - "name": "withLineNumbers", - "label": "With Line Numbers", - "namespace": [ - "posts", - "body", - "Code", - "withLineNumbers" - ] - }, - { - "type": "string", - "name": "caption", - "label": "Caption", - "namespace": [ - "posts", - "body", - "Code", - "caption" - ] - } - ], - "namespace": [ - "posts", - "body", - "Code" - ] - }, - { - "name": "h2", - "label": "H2", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "h2" - ] - }, - { - "name": "h3", - "label": "H3", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "h3" - ] - }, - { - "name": "br", - "label": "BR", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "br" - ] - }, - { - "name": "p", - "label": "P", - "inline": true, - "fields": [], - "namespace": [ - "posts", - "body", - "p" - ] - } - ], - "namespace": [ - "posts", - "body" - ] - } - ], - "namespace": [ - "posts" - ] - } - ] -} \ No newline at end of file diff --git a/.tina/__generated__/frags.gql b/.tina/__generated__/frags.gql deleted file mode 100644 index 595ff5003..000000000 --- a/.tina/__generated__/frags.gql +++ /dev/null @@ -1,8 +0,0 @@ -fragment PostsParts on Posts { - title - description - date - tags - imageUrl - body -} diff --git a/.tina/__generated__/queries.gql b/.tina/__generated__/queries.gql deleted file mode 100644 index 949e4040d..000000000 --- a/.tina/__generated__/queries.gql +++ /dev/null @@ -1,38 +0,0 @@ -query getPostsDocument($relativePath: String!) { - getPostsDocument(relativePath: $relativePath) { - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id - data { - ...PostsParts - } - } -} - -query getPostsList { - getPostsList { - totalCount - edges { - node { - id - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - data { - ...PostsParts - } - } - } - } -} diff --git a/.tina/__generated__/schema.gql b/.tina/__generated__/schema.gql deleted file mode 100644 index c7b1d6307..000000000 --- a/.tina/__generated__/schema.gql +++ /dev/null @@ -1,134 +0,0 @@ -# DO NOT MODIFY THIS FILE. This file is automatically generated by Tina -"""References another document, used as a foreign key""" -scalar Reference - -"""""" -scalar JSON - -type SystemInfo { - filename: String! - basename: String! - breadcrumbs(excludeExtension: Boolean): [String!]! - path: String! - relativePath: String! - extension: String! - template: String! - collection: Collection! -} - -type PageInfo { - hasPreviousPage: Boolean! - hasNextPage: Boolean! - startCursor: String! - endCursor: String! -} - -"""""" -interface Node { - id: ID! -} - -"""""" -interface Document { - sys: SystemInfo - id: ID! - form: JSON! - values: JSON! -} - -"""A relay-compliant pagination connection""" -interface Connection { - totalCount: Int! -} - -type Query { - getCollection(collection: String): Collection! - getCollections: [Collection!]! - node(id: String): Node! - getDocument(collection: String, relativePath: String): DocumentNode! - getDocumentList(before: String, after: String, first: Int, last: Int): DocumentConnection! - getDocumentFields: JSON! - getPostsDocument(relativePath: String): PostsDocument! - getPostsList(before: String, after: String, first: Int, last: Int): PostsConnection! -} - -type DocumentConnectionEdges { - cursor: String - node: DocumentNode -} - -type DocumentConnection implements Connection { - pageInfo: PageInfo - totalCount: Int! - edges: [DocumentConnectionEdges] -} - -type Collection { - name: String! - slug: String! - label: String - path: String! - format: String - matches: String - templates: [JSON] - fields: [JSON] - documents(before: String, after: String, first: Int, last: Int): DocumentConnection! -} - -union DocumentNode = PostsDocument - -type Posts { - title: String - description: String - date: String - tags: String - imageUrl: String - body: JSON -} - -type PostsDocument implements Node & Document { - id: ID! - sys: SystemInfo! - data: Posts! - form: JSON! - values: JSON! - dataJSON: JSON! -} - -type PostsConnectionEdges { - cursor: String - node: PostsDocument -} - -type PostsConnection implements Connection { - pageInfo: PageInfo - totalCount: Int! - edges: [PostsConnectionEdges] -} - -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! -} - -input DocumentMutation { - posts: PostsMutation -} - -input PostsMutation { - title: String - description: String - date: String - tags: String - imageUrl: String - body: JSON -} - -schema { - query: Query - mutation: Mutation -} - \ No newline at end of file diff --git a/.tina/__generated__/types.ts b/.tina/__generated__/types.ts deleted file mode 100644 index c2ff7e84a..000000000 --- a/.tina/__generated__/types.ts +++ /dev/null @@ -1,339 +0,0 @@ -//@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 }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - /** References another document, used as a foreign key */ - 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; -}; - - -export type SystemInfoBreadcrumbsArgs = { - excludeExtension?: InputMaybe; -}; - -export type PageInfo = { - __typename?: 'PageInfo'; - hasPreviousPage: Scalars['Boolean']; - hasNextPage: Scalars['Boolean']; - startCursor: Scalars['String']; - endCursor: Scalars['String']; -}; - -export type Node = { - id: Scalars['ID']; -}; - -export type Document = { - sys?: Maybe; - id: Scalars['ID']; - form: Scalars['JSON']; - values: Scalars['JSON']; -}; - -/** A relay-compliant pagination connection */ -export type Connection = { - totalCount: Scalars['Int']; -}; - -export type Query = { - __typename?: 'Query'; - getCollection: Collection; - getCollections: Array; - node: Node; - getDocument: DocumentNode; - getDocumentList: DocumentConnection; - getDocumentFields: Scalars['JSON']; - getPostsDocument: PostsDocument; - getPostsList: PostsConnection; -}; - - -export type QueryGetCollectionArgs = { - collection?: InputMaybe; -}; - - -export type QueryNodeArgs = { - id?: InputMaybe; -}; - - -export type QueryGetDocumentArgs = { - collection?: InputMaybe; - relativePath?: InputMaybe; -}; - - -export type QueryGetDocumentListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -export type QueryGetPostsDocumentArgs = { - relativePath?: InputMaybe; -}; - - -export type QueryGetPostsListArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type DocumentConnectionEdges = { - __typename?: 'DocumentConnectionEdges'; - cursor?: Maybe; - node?: Maybe; -}; - -export type DocumentConnection = Connection & { - __typename?: 'DocumentConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Int']; - 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; -}; - - -export type CollectionDocumentsArgs = { - before?: InputMaybe; - after?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type DocumentNode = PostsDocument; - -export type Posts = { - __typename?: 'Posts'; - title?: Maybe; - description?: Maybe; - date?: Maybe; - tags?: Maybe; - imageUrl?: 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; -}; - -export type PostsConnection = Connection & { - __typename?: 'PostsConnection'; - pageInfo?: Maybe; - totalCount: Scalars['Int']; - edges?: Maybe>>; -}; - -export type Mutation = { - __typename?: 'Mutation'; - addPendingDocument: DocumentNode; - updateDocument: DocumentNode; - createDocument: DocumentNode; - updatePostsDocument: PostsDocument; - createPostsDocument: PostsDocument; -}; - - -export type MutationAddPendingDocumentArgs = { - collection: Scalars['String']; - relativePath: Scalars['String']; - template?: InputMaybe; -}; - - -export type MutationUpdateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; - params: DocumentMutation; -}; - - -export type MutationCreateDocumentArgs = { - collection?: InputMaybe; - relativePath: Scalars['String']; - params: DocumentMutation; -}; - - -export type MutationUpdatePostsDocumentArgs = { - relativePath: Scalars['String']; - params: PostsMutation; -}; - - -export type MutationCreatePostsDocumentArgs = { - relativePath: Scalars['String']; - params: PostsMutation; -}; - -export type DocumentMutation = { - posts?: InputMaybe; -}; - -export type PostsMutation = { - title?: InputMaybe; - description?: InputMaybe; - date?: InputMaybe; - tags?: InputMaybe; - imageUrl?: InputMaybe; - body?: InputMaybe; -}; - -export type PostsPartsFragment = { __typename?: 'Posts', title?: string | null | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined }; - -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 | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined } } }; - -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 | undefined, description?: string | null | undefined, date?: string | null | undefined, tags?: string | null | undefined, imageUrl?: string | null | undefined, body?: any | null | undefined } } | null | undefined } | null | undefined> | null | undefined } }; - -export const PostsPartsFragmentDoc = gql` - fragment PostsParts on Posts { - title - description - date - tags - imageUrl - body -} - `; -export const GetPostsDocumentDocument = gql` - query getPostsDocument($relativePath: String!) { - getPostsDocument(relativePath: $relativePath) { - sys { - filename - basename - breadcrumbs - path - relativePath - extension - } - id - data { - ...PostsParts - } - } -} - ${PostsPartsFragmentDoc}`; -export const GetPostsListDocument = gql` - 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); - } - }; - } - export type Sdk = ReturnType; - -// TinaSDK generated code -import { staticRequest } from 'tinacms' -const requester: (doc: any, vars?: any, options?: any) => Promise = async ( - doc, - vars, - _options -) => { - let data = {} - try { - data = await staticRequest({ - query: doc, - variables: vars, - }) - } catch (e) { - // swallow errors related to document creation - console.warn('Warning: There was an error when fetching data') - console.warn(e) - } - - return { data, query: doc, variables: vars || {} } -} - -/** - * @experimental this class can be used but may change in the future - **/ -export const ExperimentalGetTinaClient = ()=>getSdk(requester) - diff --git a/README.md b/README.md index 4dada7980..1d6857a6c 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,17 @@ ## Table Of Contents -- [Features](#-features) -- [Getting Started](#-getting-started) -- [One click deploy](#one-click-deploy) -- [Built With](#-built-with) -- [Contributing](#-contributing) +- [Table Of Contents](#table-of-contents) +- [Features](#features) +- [🤓 Getting Started](#-getting-started) +- [🚀 One click deploy](#-one-click-deploy) +- [🦙 Adding TinaCMS editing in production](#-adding-tinacms-editing-in-production) +- [🧰 Built With](#-built-with) +- [🤲🏻 Contributing](#-contributing) - [Creating A Pull Request](#creating-a-pull-request) -- [Acknowledgements](#-acknowledgements) -- [Contributors](#-contributors) -- [License](#-license) +- [😎 Acknowledgements](#-acknowledgements) +- [✨ Contributors](#-contributors) +- [📝 License](#-license) ## Features @@ -91,6 +93,15 @@ Clone the repository and one-click deploy to Netlify for free! [![Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/Blazity/next-saas-starter) +## 🦙 Adding TinaCMS editing in production + +By default, TinaCMS is disabled in production. This is so that you are not forced to use TinaCMS. To enable it, you need to create [Tina Cloud account](https://app.tina.io/), [a project](https://tina.io/docs/tina-cloud/) and fill these `NEXT_PUBLIC_ORGANIZATION_NAME`, `NEXT_PUBLIC_TINA_CLIENT_ID`, `TINA_TOKEN` env vars with proper values. After that you can build the editing interface by updating your build script to be. + +```diff +- "build": "tinacms dev -c 'next build'", ++ "build": "tinacms build && next build" +``` + ## 🧰 Built With - Statically generated pages with [**Next.js** ](https://github.com/vercel/next.js) diff --git a/components/MDXRichText.tsx b/components/MDXRichText.tsx index 75a67dca9..121fa0024 100644 --- a/components/MDXRichText.tsx +++ b/components/MDXRichText.tsx @@ -1,3 +1,4 @@ +import { Language } from 'prism-react-renderer'; import styled from 'styled-components'; import { Components, TinaMarkdown, TinaMarkdownContent } from 'tinacms/dist/rich-text'; import { media } from 'utils/media'; @@ -6,14 +7,6 @@ import Code from './Code'; import Link from './Link'; import Quote from './Quote'; -export default function RichText(props: { content: TinaMarkdownContent | TinaMarkdownContent[] }) { - return ( - - } /> - - ); -} - const Container = styled.div` display: flex; ${'' /* Opting-out of margin-collapse */} @@ -108,10 +101,25 @@ const components = { h3: ThirdHeading, p: Paragraph, br: Break, - inlineCode: TextHighlight, + code: TextHighlight, Image: ArticleImage, Link, - Code, + code_block: (props: { value?: string; language?: string }) => { + return ; + }, + Code: (args: any) => { + const selectedLines: string = args.selectedLines; + const lines = selectedLines?.split(',').map((x) => Number(x)); + return ; + }, Quote, ArticleImage, }; + +export default function RichText(props: { content: TinaMarkdownContent | TinaMarkdownContent[] }) { + return ( + + } /> + + ); +} diff --git a/next.config.js b/next.config.js index b4bd5114b..4c9fa4fb8 100644 --- a/next.config.js +++ b/next.config.js @@ -6,6 +6,14 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ module.exports = withBundleAnalyzer({ reactStrictMode: true, + async rewrites() { + return [ + { + source: '/admin', + destination: '/admin/index.html', + }, + ]; + }, pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'], images: { domains: ['github.blog'], diff --git a/package.json b/package.json index 7298bf212..651bb22bf 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "yarn tinacms server:start -c \"next dev\"", - "build": "yarn tinacms server:start -c \"next build\"", - "start": "yarn tinacms server:start -c \"next start\"", + "dev": "yarn tinacms dev -c \"next dev\"", + "build": "tinacms dev -c 'next build'", + "start": "next start", "lint": "next lint" }, "dependencies": { @@ -41,7 +41,7 @@ "@babel/eslint-parser": "^7.21.3", "@fec/remark-a11y-emoji": "^3.1.0", "@next/bundle-analyzer": "^13.1.6", - "@tinacms/cli": "^0.60.0", + "@tinacms/cli": "^1.5.6", "@types/react": "^17.0.20", "@types/react-mailchimp-subscribe": "^2.1.1", "@types/styled-components": "^5.1.25", diff --git a/pages/_app.tsx b/pages/_app.tsx index 5a4852a18..5a5d2c1ed 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -4,11 +4,9 @@ import 'swiper/css/navigation'; import 'swiper/css/autoplay'; import { AppProps } from 'next/dist/shared/lib/router/router'; -import dynamic from 'next/dynamic'; import Head from 'next/head'; import { ColorModeScript } from 'nextjs-color-mode'; import React, { PropsWithChildren } from 'react'; -import { TinaEditProvider } from 'tinacms/dist/edit-state'; import Footer from 'components/Footer'; import { GlobalStyle } from 'components/GlobalStyles'; @@ -26,8 +24,6 @@ const navItems: NavItems = [ { title: 'Sign up', href: '/sign-up', outlined: true }, ]; -const TinaCMS = dynamic(() => import('tinacms'), { ssr: false }); - function MyApp({ Component, pageProps }: AppProps) { return ( <> @@ -51,23 +47,7 @@ function MyApp({ Component, pageProps }: AppProps) { - - {(livePageProps: any) => } - - } - > - - +