2023-11-10 20:52:47 +00:00
|
|
|
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,
|
2023-11-10 22:27:28 +00:00
|
|
|
clientId: "e4537a30-23f9-4ad7-8a1f-f844a298dff3", // Get this from tina.io
|
2023-11-10 21:18:01 +00:00
|
|
|
token: $TINA_TOKEN, // Get this from tina.io
|
2023-11-10 20:52:47 +00:00
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
});
|