-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path_cms.ts
78 lines (73 loc) · 1.57 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
import lumeCMS from "lume/cms/mod.ts";
const cms = lumeCMS();
cms.document({
name: "Settings",
description: "Global settings for the site",
store: "src:_data.yml",
url: "/",
fields: [
{
name: "logo",
type: "file",
description:
"The logo of the site. If it's emtpy, the title will be used",
},
{
name: "lang",
type: "text",
label: "Language",
description: "The language of the site",
},
{
name: "extra_head",
type: "code",
description: "Extra content to include in the <head> tag",
},
{
name: "menu_links",
type: "object-list",
description: "Extra links to include in the main menu",
fields: [
{
name: "text",
type: "text",
label: "Text",
},
{
name: "href",
type: "text",
label: "URL",
},
{
name: "icon",
type: "text",
label: "Icon",
description:
"<a href='https://phosphoricons.com/' target='_blank'>A Phosphor icon</a> name",
},
],
},
],
});
cms.collection(
"pages: All pages of the site",
"src:**/*.md",
[
{
name: "extra_head",
type: "code",
description: "Extra content to include in the HEAD tag",
},
{
name: "hide_menu",
type: "checkbox",
description: "Hide this page from the main menu",
},
"content: markdown",
],
);
cms.upload(
"uploads: Uploaded files",
"src:**/*{.jpg,.svg,.png,.gif,.mp3,.mp4,.pdf}",
);
export default cms;