mirror of https://github.com/onweru/compose.git

weru
02.29.2025 435f1a7a2f2c3ec6924e3ec2c726c23d5453cc25
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
import { Collection } from "tinacms";
 
const Menu: Collection = {
  name: "menu",
  label: "Menus",
  path: "config/_default/menus/",
  format: "toml",
  ui: {
    allowedActions: {
      create: false,
      delete: false,
    }
  },
  match: {
    include: "*menu*",
  },
  fields: [
    {
      type: "object",
      name: "main",
      label: "Main Menu",
      list: true,
      ui: {
        itemProps: (item) => {
          return { label: item?.name };
        }
      },
      fields: [
        {
          type: "string",
          name: "name",
          label: "Name"
        },
        {
          type: "string",
          name: "url",
          label: "URL"
        },
        {
          type: "string",
          name: "weight",
          label: "Weight",
          description: "Controls ordering"
        },
      ]
    }
  ]
};
 
export default Menu;