42 lines
938 B
TypeScript
42 lines
938 B
TypeScript
|
import { defineConfig } from "tinacms";
|
||
|
import Author from "./collection/author";
|
||
|
import Event from "./collection/event";
|
||
|
import Post from "./collection/post";
|
||
|
import Page from "./collection/page";
|
||
|
|
||
|
// Your hosting provider likely exposes this as an environment variable
|
||
|
const branch =
|
||
|
process.env.GITHUB_BRANCH ||
|
||
|
process.env.VERCEL_GIT_COMMIT_REF ||
|
||
|
process.env.HEAD ||
|
||
|
"main";
|
||
|
|
||
|
export default defineConfig({
|
||
|
branch,
|
||
|
|
||
|
// Get this from tina.io
|
||
|
clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID,
|
||
|
// Get this from tina.io
|
||
|
token: process.env.TINA_TOKEN,
|
||
|
|
||
|
build: {
|
||
|
outputFolder: "admin",
|
||
|
publicFolder: "public",
|
||
|
},
|
||
|
media: {
|
||
|
tina: {
|
||
|
mediaRoot: "",
|
||
|
publicFolder: "public",
|
||
|
},
|
||
|
},
|
||
|
// See docs on content modeling for more info on how to setup new content models: https://tina.io/docs/schema/
|
||
|
schema: {
|
||
|
collections: [
|
||
|
Author,
|
||
|
Event,
|
||
|
Page,
|
||
|
Post,
|
||
|
],
|
||
|
},
|
||
|
});
|