Skip to content

Commit cc60c24

Browse files
committed
Add ContentLayer to parse YAML files
1 parent a3c0814 commit cc60c24

94 files changed

Lines changed: 11139 additions & 2205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// contentlayer.config.js
2+
import { defineDocumentType, defineNestedType, makeSource } from "contentlayer/source-files";
3+
var Site = defineDocumentType(() => ({
4+
name: "Site",
5+
description: "Type Site contains information about the website, such as the title and a description of the website.",
6+
contentType: "data",
7+
filePathPattern: "/config/site.yaml",
8+
isSingleton: true,
9+
fields: {
10+
title: { type: "string", required: true },
11+
description: { type: "string", required: true },
12+
baseUrl: { type: "string", required: true },
13+
languageCode: { type: "string", required: true }
14+
}
15+
}));
16+
var Menu = defineDocumentType(() => ({
17+
name: "Menu",
18+
description: "Type Menu contains information about the website menu and its entries, including their label and link.",
19+
contentType: "data",
20+
filePathPattern: "/config/menu.yaml",
21+
isSingleton: true,
22+
fields: {
23+
entries: { type: "list" },
24+
of: Link,
25+
required: true
26+
}
27+
}));
28+
var Link = defineNestedType(() => ({
29+
name: "Link",
30+
fields: {
31+
label: { type: "string", required: true },
32+
link: { type: "string", required: true }
33+
}
34+
}));
35+
var contentlayer_config_default = makeSource({ contentDirPath: "content", documentTypes: [Site, Menu] });
36+
export {
37+
Menu,
38+
Site,
39+
contentlayer_config_default as default
40+
};
41+
//# sourceMappingURL=compiled-contentlayer-config-35JYZC4A.mjs.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../../../contentlayer.config.js"],
4+
"sourcesContent": ["import { defineDocumentType, defineNestedType, makeSource } from \"contentlayer/source-files\";\n\n// Type Site contains information about the website, such as: the title of the\n// website, a description, an associated image, among others.\nexport const Site = defineDocumentType(() => ({\n name: \"Site\",\n description:\n \"Type Site contains information about the website, such as the title and a description of the website.\",\n contentType: \"data\",\n filePathPattern: \"/config/site.yaml\",\n isSingleton: true,\n fields: {\n title: { type: \"string\", required: true },\n description: { type: \"string\", required: true },\n baseUrl: { type: \"string\", required: true },\n languageCode: { type: \"string\", required: true },\n },\n}));\n\n// Type Menu contains information about the website menu and its entries,\n// including their label and link.\nexport const Menu = defineDocumentType(() => ({\n name: \"Menu\",\n description:\n \"Type Menu contains information about the website menu and its entries, including their label and link.\",\n contentType: \"data\",\n filePathPattern: \"/config/menu.yaml\",\n isSingleton: true,\n fields: {\n entries: { type: \"list\" },\n of: Link,\n required: true,\n },\n}));\n\nconst Link = defineNestedType(() => ({\n name: \"Link\",\n fields: {\n label: { type: \"string\", required: true },\n link: { type: \"string\", required: true },\n },\n}));\n\n\nexport default makeSource({ contentDirPath: \"content\", documentTypes: [Site, Menu] });\n"],
5+
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB,kBAAkB;AAI1D,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,aAAa,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC9C,SAAS,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC1C,cAAc,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,EACjD;AACF,EAAE;AAIK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,SAAS,EAAE,MAAM,OAAO;AAAA,IACxB,IAAI;AAAA,IACJ,UAAU;AAAA,EACZ;AACF,EAAE;AAEF,IAAM,OAAO,iBAAiB,OAAO;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,EACzC;AACF,EAAE;AAGF,IAAO,8BAAQ,WAAW,EAAE,gBAAgB,WAAW,eAAe,CAAC,MAAM,IAAI,EAAE,CAAC;",
6+
"names": []
7+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// contentlayer.config.js
2+
import { defineDocumentType, makeSource } from "contentlayer/source-files";
3+
var Site = defineDocumentType(() => ({
4+
name: "Site",
5+
description: "Type Site contains information about the website, such as the title and a description of the website.",
6+
contentType: "data",
7+
filePathPattern: "/config/site.yaml",
8+
isSingleton: true,
9+
fields: {
10+
title: { type: "string", required: true },
11+
description: { type: "string", required: true },
12+
baseUrl: { type: "string", required: true },
13+
languageCode: { type: "string", required: true }
14+
},
15+
computedFields: {}
16+
}));
17+
var contentlayer_config_default = makeSource({ contentDirPath: "content", documentTypes: [Site] });
18+
export {
19+
Site,
20+
contentlayer_config_default as default
21+
};
22+
//# sourceMappingURL=compiled-contentlayer-config-4MFTSRUU.mjs.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../../../contentlayer.config.js"],
4+
"sourcesContent": ["import { defineDocumentType, makeSource } from \"contentlayer/source-files\";\n\n// Type Site contains information about the website, such as: the title of the\n// website, a description, an associated image, among others.\nexport const Site = defineDocumentType(() => ({\n name: \"Site\",\n description:\n \"Type Site contains information about the website, such as the title and a description of the website.\",\n contentType: \"data\",\n filePathPattern: \"/config/site.yaml\",\n isSingleton: true,\n fields: {\n title: { type: \"string\", required: true },\n description: { type: \"string\", required: true },\n baseUrl: { type: \"string\", required: true },\n languageCode: { type: \"string\", required: true },\n },\n computedFields: {},\n}));\n\nexport default makeSource({ contentDirPath: \"content\", documentTypes: [Site] });\n"],
5+
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAIxC,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,aAAa,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC9C,SAAS,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC1C,cAAc,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,EACjD;AAAA,EACA,gBAAgB,CAAC;AACnB,EAAE;AAEF,IAAO,8BAAQ,WAAW,EAAE,gBAAgB,WAAW,eAAe,CAAC,IAAI,EAAE,CAAC;",
6+
"names": []
7+
}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
// contentlayer.config.js
2+
import {
3+
defineDocumentType,
4+
defineNestedType,
5+
makeSource
6+
} from "contentlayer/source-files";
7+
var Site = defineDocumentType(() => ({
8+
name: "Site",
9+
description: "Type Site contains information about the website, such as the title and a description of the website.",
10+
contentType: "data",
11+
filePathPattern: "/config/site.yaml",
12+
isSingleton: true,
13+
fields: {
14+
title: { type: "string", required: true },
15+
description: { type: "string", required: true },
16+
baseUrl: { type: "string", required: true },
17+
languageCode: { type: "string", required: true }
18+
}
19+
}));
20+
var Menu = defineDocumentType(() => ({
21+
name: "Menu",
22+
description: "Type Menu contains information about the website menu and its entries, including their label and link.",
23+
contentType: "data",
24+
filePathPattern: "/config/menu.yaml",
25+
isSingleton: true,
26+
fields: {
27+
title: { type: "string", required: false },
28+
entries: { type: "list", of: Link, required: true }
29+
}
30+
}));
31+
var Link = defineNestedType(() => ({
32+
name: "Link",
33+
fields: {
34+
label: { type: "string", required: true },
35+
link: { type: "string", required: false },
36+
blank: { type: "bool", required: false }
37+
}
38+
}));
39+
var Hero = defineDocumentType(() => ({
40+
name: "Hero",
41+
description: "Type Hero contains information about the website Hero section.",
42+
contentType: "data",
43+
filePathPattern: "/data/hero.yaml",
44+
isSingleton: true,
45+
fields: {
46+
title: { type: "string", required: true },
47+
lead: { type: "string", required: true },
48+
backgroundImage: { type: "string", required: true }
49+
}
50+
}));
51+
var History = defineDocumentType(() => ({
52+
name: "History",
53+
description: "Type History contains information about the website History section.",
54+
contentType: "data",
55+
filePathPattern: "/data/history.yaml",
56+
isSingleton: true,
57+
fields: {
58+
pretitle: { type: "string", required: true },
59+
title: { type: "string", required: true },
60+
text: { type: "string", required: true },
61+
image: { type: "string", required: true }
62+
}
63+
}));
64+
var About = defineDocumentType(() => ({
65+
name: "About",
66+
description: "Type About contains information about the website About section.",
67+
contentType: "data",
68+
filePathPattern: "/data/about.yaml",
69+
isSingleton: true,
70+
fields: {
71+
pretitle: { type: "string", required: true },
72+
title: { type: "string", required: true },
73+
text: { type: "string", required: true },
74+
image: { type: "string", required: true },
75+
brands: { type: "nested", of: Brands, required: true }
76+
}
77+
}));
78+
var Brands = defineNestedType(() => ({
79+
name: "Brands",
80+
fields: {
81+
title: { type: "string", required: true },
82+
items: { type: "list", of: Brand, required: true }
83+
}
84+
}));
85+
var Brand = defineNestedType(() => ({
86+
name: "Brand",
87+
fields: {
88+
label: { type: "string", required: true },
89+
image: { type: "string", required: true }
90+
}
91+
}));
92+
var Services = defineDocumentType(() => ({
93+
name: "Services",
94+
description: "Type Services contains information about the website Services section.",
95+
contentType: "data",
96+
filePathPattern: "/data/services.yaml",
97+
isSingleton: true,
98+
fields: {
99+
pretitle: { type: "string", required: true },
100+
title: { type: "string", required: true },
101+
text: { type: "string", required: true },
102+
image: { type: "string", required: true }
103+
}
104+
}));
105+
var Footer = defineDocumentType(() => ({
106+
name: "Footer",
107+
description: "Type Footer contains information about the website Footer section.",
108+
contentType: "data",
109+
filePathPattern: "/data/footer.yaml",
110+
isSingleton: true,
111+
fields: {
112+
menu: { type: "nested", of: Menu, required: true },
113+
hours: { type: "nested", of: Menu, required: true },
114+
location: { type: "nested", of: Menu, required: true },
115+
copyright: { type: "nested", of: Menu, required: true }
116+
}
117+
}));
118+
var contentlayer_config_default = makeSource({
119+
contentDirPath: "content",
120+
documentTypes: [Site, Menu, Hero, History, About, Services]
121+
});
122+
export {
123+
About,
124+
Footer,
125+
Hero,
126+
History,
127+
Menu,
128+
Services,
129+
Site,
130+
contentlayer_config_default as default
131+
};
132+
//# sourceMappingURL=compiled-contentlayer-config-6RRXEKMU.mjs.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../../../contentlayer.config.js"],
4+
"sourcesContent": ["import {\n defineDocumentType,\n defineNestedType,\n makeSource,\n} from \"contentlayer/source-files\";\n\n// Type Site contains information about the website, such as: the title of the\n// website, a description, an associated image, among others.\nexport const Site = defineDocumentType(() => ({\n name: \"Site\",\n description:\n \"Type Site contains information about the website, such as the title and a description of the website.\",\n contentType: \"data\",\n filePathPattern: \"/config/site.yaml\",\n isSingleton: true,\n fields: {\n title: { type: \"string\", required: true },\n description: { type: \"string\", required: true },\n baseUrl: { type: \"string\", required: true },\n languageCode: { type: \"string\", required: true },\n },\n}));\n\n// Type Menu contains information about the website menu and its entries,\n// including their label and link.\nexport const Menu = defineDocumentType(() => ({\n name: \"Menu\",\n description:\n \"Type Menu contains information about the website menu and its entries, including their label and link.\",\n contentType: \"data\",\n filePathPattern: \"/config/menu.yaml\",\n isSingleton: true,\n fields: {\n title: { type: \"string\", required: false },\n entries: { type: \"list\", of: Link, required: true },\n },\n}));\n\nconst Link = defineNestedType(() => ({\n name: \"Link\",\n fields: {\n label: { type: \"string\", required: true },\n link: { type: \"string\", required: false },\n blank: { type: \"bool\", required: false },\n },\n}));\n\n// Type Hero contains information about the website Hero section.\nexport const Hero = defineDocumentType(() => ({\n name: \"Hero\",\n description: \"Type Hero contains information about the website Hero section.\",\n contentType: \"data\",\n filePathPattern: \"/data/hero.yaml\",\n isSingleton: true,\n fields: {\n title: { type: \"string\", required: true },\n lead: { type: \"string\", required: true },\n backgroundImage: { type: \"string\", required: true },\n },\n}));\n\n// Type History contains information about the website History section.\nexport const History = defineDocumentType(() => ({\n name: \"History\",\n description:\n \"Type History contains information about the website History section.\",\n contentType: \"data\",\n filePathPattern: \"/data/history.yaml\",\n isSingleton: true,\n fields: {\n pretitle: { type: \"string\", required: true },\n title: { type: \"string\", required: true },\n text: { type: \"string\", required: true },\n image: { type: \"string\", required: true },\n },\n}));\n\n// Type About contains information about the website About section.\nexport const About = defineDocumentType(() => ({\n name: \"About\",\n description:\n \"Type About contains information about the website About section.\",\n contentType: \"data\",\n filePathPattern: \"/data/about.yaml\",\n isSingleton: true,\n fields: {\n pretitle: { type: \"string\", required: true },\n title: { type: \"string\", required: true },\n text: { type: \"string\", required: true },\n image: { type: \"string\", required: true },\n brands: { type: \"nested\", of: Brands, required: true },\n },\n}));\n\nconst Brands = defineNestedType(() => ({\n name: \"Brands\",\n fields: {\n title: { type: \"string\", required: true },\n items: { type: \"list\", of: Brand, required: true },\n },\n}));\n\nconst Brand = defineNestedType(() => ({\n name: \"Brand\",\n fields: {\n label: { type: \"string\", required: true },\n image: { type: \"string\", required: true },\n },\n}));\n\n// Type Services contains information about the website Services section.\nexport const Services = defineDocumentType(() => ({\n name: \"Services\",\n description:\n \"Type Services contains information about the website Services section.\",\n contentType: \"data\",\n filePathPattern: \"/data/services.yaml\",\n isSingleton: true,\n fields: {\n pretitle: { type: \"string\", required: true },\n title: { type: \"string\", required: true },\n text: { type: \"string\", required: true },\n image: { type: \"string\", required: true },\n },\n}));\n\n// Type Footer contains information about the website Footer section.\nexport const Footer = defineDocumentType(() => ({\n name: \"Footer\",\n description:\n \"Type Footer contains information about the website Footer section.\",\n contentType: \"data\",\n filePathPattern: \"/data/footer.yaml\",\n isSingleton: true,\n fields: {\n menu: { type: \"nested\", of: Menu, required: true },\n hours: { type: \"nested\", of: Menu, required: true },\n location: { type: \"nested\", of: Menu, required: true },\n copyright: { type: \"nested\", of: Menu, required: true },\n },\n}));\n\nexport default makeSource({\n contentDirPath: \"content\",\n documentTypes: [Site, Menu, Hero, History, About, Services],\n});\n"],
5+
"mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIA,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,aAAa,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC9C,SAAS,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IAC1C,cAAc,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,EACjD;AACF,EAAE;AAIK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aACE;AAAA,EACF,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACzC,SAAS,EAAE,MAAM,QAAQ,IAAI,MAAM,UAAU,KAAK;AAAA,EACpD;AACF,EAAE;AAEF,IAAM,OAAO,iBAAiB,OAAO;AAAA,EACnC,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,OAAO,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,EACzC;AACF,EAAE;AAGK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAA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