added Tina CMS

This commit is contained in:
Hamza Ahmed
2023-11-10 20:52:47 +00:00
parent 5ce258a868
commit 23fd594e9a
7 changed files with 12624 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import { defineConfig } from "tinacms";
// Your hosting provider likely exposes this as an environment variable
const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main";
export default defineConfig({
branch,
clientId: null, // Get this from tina.io
token: null, // Get this from tina.io
build: {
outputFolder: "admin",
publicFolder: "static",
},
media: {
tina: {
mediaRoot: "",
publicFolder: "static",
},
},
schema: {
collections: [
{
name: "post",
label: "Posts",
path: "content/posts",
fields: [
{
type: "string",
name: "title",
label: "Title",
isTitle: true,
required: true,
},
{
type: "rich-text",
name: "body",
label: "Body",
isBody: true,
},
],
},
],
},
});