config.tsx (1113B)
1 import { defineConfig } from "tinacms"; 2 3 import Post from "./collection/post"; 4 import Global from "./collection/global"; 5 import Author from "./collection/author"; 6 import Page from "./collection/page"; 7 8 const config = defineConfig({ 9 clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID!, 10 branch: 11 process.env.NEXT_PUBLIC_TINA_BRANCH! || // custom branch env override 12 process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF! || // Vercel branch env 13 process.env.HEAD!, // Netlify branch env 14 token: process.env.TINA_TOKEN!, 15 media: { 16 // If you wanted cloudinary do this 17 // loadCustomStore: async () => { 18 // const pack = await import("next-tinacms-cloudinary"); 19 // return pack.TinaCloudCloudinaryMediaStore; 20 // }, 21 // this is the config for the tina cloud media store 22 tina: { 23 publicFolder: "public", 24 mediaRoot: "uploads", 25 }, 26 }, 27 build: { 28 publicFolder: "public", // The public asset folder for your framework 29 outputFolder: "admin", // within the public folder 30 }, 31 schema: { 32 collections: [Post, Global, Author, Page], 33 }, 34 }); 35 36 export default config;