126 lines
2.8 KiB
TypeScript
126 lines
2.8 KiB
TypeScript
import { defineConfig } from "tinacms";
|
|
|
|
const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main";
|
|
|
|
export default defineConfig({
|
|
branch,
|
|
clientId: null,
|
|
token: null,
|
|
build: {
|
|
outputFolder: "admin",
|
|
publicFolder: "public",
|
|
},
|
|
media: {
|
|
tina: {
|
|
mediaRoot: "public/images",
|
|
publicFolder: "public",
|
|
},
|
|
},
|
|
schema: {
|
|
collections: [
|
|
{
|
|
name: "news",
|
|
label: "News",
|
|
path: "src/content/news",
|
|
format: "md",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "locale",
|
|
label: "Language",
|
|
options: [
|
|
{ label: "Español", value: "es" },
|
|
{ label: "English", value: "en" },
|
|
{ label: "Kinyarwanda", value: "rw" },
|
|
],
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title",
|
|
label: "Title",
|
|
isTitle: true,
|
|
required: true,
|
|
},
|
|
{
|
|
type: "datetime",
|
|
name: "date",
|
|
label: "Date",
|
|
required: true,
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "slug",
|
|
label: "Slug",
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "place",
|
|
label: "Place",
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "thumbnail",
|
|
label: "Thumbnail URL",
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "youtube",
|
|
label: "YouTube ID",
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "tags",
|
|
label: "Tags (comma separated)",
|
|
},
|
|
{
|
|
type: "boolean",
|
|
name: "draft",
|
|
label: "Draft",
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "body",
|
|
label: "Content",
|
|
isBody: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "documentaries",
|
|
label: "Documentaries",
|
|
path: "src/content/documentaries",
|
|
format: "md",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "locale",
|
|
label: "Language",
|
|
options: [
|
|
{ label: "Español", value: "es" },
|
|
{ label: "English", value: "en" },
|
|
{ label: "Kinyarwanda", value: "rw" },
|
|
],
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title",
|
|
label: "Title",
|
|
isTitle: true,
|
|
required: true,
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "video_yt",
|
|
label: "YouTube ID",
|
|
},
|
|
{
|
|
type: "datetime",
|
|
name: "date",
|
|
label: "Date",
|
|
required: true,
|
|
},
|
|
]
|
|
},
|
|
],
|
|
},
|
|
}); |