Files
blog-ahmza-com/tina/config.ts
T
2023-11-11 01:08:53 +00:00

66 lines
1.4 KiB
TypeScript

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: "f68869c9-46b7-4f70-bf52-46783f537a63", // Get this from tina.io
token: "e1040fd77966916ca7aa0b2480f9c6bbf865fe7d", // 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,
},
],
},
{
name: "products",
label: "Products",
path: "content/products",
fields: [
{
type: "string",
name: "productName",
title: "Product Name",
isTitle: true,
required: true,
},
{
type: "rich-text",
name: "description",
label: "Description",
isBody: true,
},
]
},
],
},
});