-
Notifications
You must be signed in to change notification settings - Fork 2
/
_cms.ts
83 lines (79 loc) · 1.74 KB
/
_cms.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import lumeCMS from "lume/cms/mod.ts";
const cms = lumeCMS();
cms.document(
"home: The profile page",
"src:index.yml",
[
{
type: "hidden",
name: "layout",
value: "layouts/home.vto",
},
{
type: "object",
name: "header",
description: "The header of the page",
fields: [
"title: text",
"description: markdown",
"avatar: file",
],
},
{
type: "object",
name: "metas",
description: "Data for the meta tags",
fields: [
"title: text",
"description: text",
"image: text",
"twitter: text",
"generator: checkbox",
],
},
{
name: "links",
type: "object-list",
description: "The list of links.",
fields: [
{
type: "text",
name: "type",
description:
"The type of link. It uses the icons and colors from https://simpleicons.org/. For example, 'github', 'instagram', etc.",
options: [
"github",
"instagram",
"linkedin",
"x",
"youtube",
"facebook",
"tiktok",
"patreon",
"paypal",
"mastodon",
"discord",
"spotify",
"opencollective",
"twitch",
],
},
"text: text",
"href: text",
"only_icon: checkbox",
],
},
{
name: "extra_head",
type: "code",
description: "Extra content to include in the <head> tag",
},
{
name: "footer",
type: "markdown",
description: "The footer of the page",
},
],
);
cms.upload("uploads: Uploaded files", "src:*{.jpg,.svg}");
export default cms;