first version which seems to run

This commit is contained in:
Gerhard Scheikl
2026-04-01 19:15:22 +02:00
parent 80e965aa57
commit fc107d576c
25 changed files with 963 additions and 40 deletions

View File

@@ -1,22 +1,23 @@
import { defineConfig } from "tinacms";
import { defineConfig, LocalAuthProvider } from "tinacms";
import { UsernamePasswordAuthJSProvider } from "tinacms-authjs/dist/tinacms";
import { schema } from "./schema";
const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === "true";
export const config = defineConfig({
telemetry: 'disabled',
contentApiUrlOverride: "/api/tina/gql",
authProvider: isLocal
? new LocalAuthProvider()
: new UsernamePasswordAuthJSProvider(),
schema,
clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID,
branch:
process.env.TINA_GIT_BRANCH ||
process.env.NEXT_PUBLIC_TINA_BRANCH || // custom branch env override
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF || // Vercel branch env
process.env.HEAD, // Netlify branch env
process.env.HEAD || // Netlify branch env
"main",
token: process.env.TINA_TOKEN,
media: {
// If you wanted cloudinary do this
// loadCustomStore: async () => {
// const pack = await import("next-tinacms-cloudinary");
// return pack.TinaCloudCloudinaryMediaStore;
// },
// this is the config for the tina cloud media store
tina: {
publicFolder: "public",
mediaRoot: "",
@@ -24,8 +25,8 @@ export const config = defineConfig({
accept: ["image/*", "video/*", "application/json", ".json"],
},
build: {
publicFolder: "public", // The public asset folder for your framework
outputFolder: "admin", // within the public folder
publicFolder: "public",
outputFolder: "admin",
basePath: process.env.TINA_BASE_PATH || "",
},
});