-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvelite.config.ts
More file actions
121 lines (120 loc) · 3.27 KB
/
velite.config.ts
File metadata and controls
121 lines (120 loc) · 3.27 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import rehypeShiki from "@shikijs/rehype";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeSlug from "rehype-slug";
import { defineConfig, s } from "velite";
export default defineConfig({
root: ".content-build",
output: {
data: ".velite",
assets: "public/static",
base: "/static/",
clean: true,
},
markdown: {
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
behavior: "prepend",
properties: {
className: ["heading-anchor"],
ariaHidden: true,
tabIndex: -1,
},
content: {
type: "element",
tagName: "svg",
properties: {
xmlns: "http://www.w3.org/2000/svg",
width: "1em",
height: "1em",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
className: ["heading-anchor-icon"],
},
children: [
{
type: "element",
tagName: "path",
properties: {
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
},
children: [],
},
{
type: "element",
tagName: "path",
properties: {
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
},
children: [],
},
],
},
},
],
[
// biome-ignore lint/suspicious/noExplicitAny: <following documentation>
rehypeShiki as any,
{
themes: {
light: "github-light",
dark: "github-dark",
},
},
],
],
},
collections: {
posts: {
name: "Post",
pattern: "posts/**/*.md",
schema: s.object({
title: s.string().max(200),
slug: s.slug("posts"),
created: s.isodate(),
updated: s.isodate().optional(),
description: s.string().optional(),
category: s.string(),
tags: s.array(s.string()).optional(),
type: s.array(s.enum(["til", "series"])).optional(),
series: s.string().optional(),
order: s.number().optional(),
metadata: s.metadata(),
toc: s.toc(),
content: s.markdown(),
}),
},
projects: {
name: "Project",
pattern: "projects/**/*.md",
schema: s.object({
title: s.string().max(200),
slug: s.slug("projects"),
description: s.string(),
techs: s.array(s.string()),
status: s.enum(["in-progress", "active", "archived"]),
startDate: s.isodate(),
endDate: s.isodate().optional(),
github: s.string().optional(),
url: s.string().optional(),
thumbnail: s.image().optional(),
projectType: s.enum(["personal", "team", "company"]).default("personal"),
content: s.markdown(),
}),
},
about: {
name: "About",
pattern: "about.md",
single: true,
schema: s.object({
content: s.markdown(),
}),
},
},
});