-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ts
58 lines (54 loc) · 1.24 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { defineConfig } from "tinacms";
// Your hosting provider likely exposes this as an environment variable
const branch =
process.env.TINA_BRANCH ||
process.env.VERCEL_GIT_COMMIT_REF ||
process.env.HEAD ||
"main";
export default defineConfig({
branch,
// Get this from tina.io
clientId: process.env.TINA_CLIENT_ID,
// Get this from tina.io
token: process.env.TINA_TOKEN,
build: {
outputFolder: "admin",
publicFolder: "public",
},
media: {
tina: {
mediaRoot: "assets",
publicFolder: "public",
},
},
// See docs on content modeling for more info on how to setup new content models: https://tina.io/docs/schema/
schema: {
collections: [
{
name: "post",
label: "Posts",
path: "content/posts",
ui: {
router: (props) => {
return `/posts/${props.document._sys.filename}`;
},
},
fields: [
{
type: "string",
name: "title",
label: "Title",
isTitle: true,
required: true,
},
{
type: "rich-text",
name: "body",
label: "Body",
isBody: true,
},
],
},
],
},
});