-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.ts
77 lines (74 loc) · 2.1 KB
/
_config.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
import lume from "lume/mod.ts";
import date from "lume/plugins/date.ts";
import lightningCSS from "lume/plugins/lightningcss.ts";
import metas from "lume/plugins/metas.ts";
import minifyHTML from "lume/plugins/minify_html.ts";
import nav from "lume/plugins/nav.ts";
import picture from "lume/plugins/picture.ts";
import postcss from "lume/plugins/postcss.ts";
import redirects from "lume/plugins/redirects.ts";
import robots from "lume/plugins/robots.ts";
import sitemap from "lume/plugins/sitemap.ts";
import svgo from "lume/plugins/svgo.ts";
import tailwindcss from "lume/plugins/tailwindcss.ts";
import transformImages from "lume/plugins/transform_images.ts";
import typography from "npm:@tailwindcss/typography";
import { fr } from "npm:date-fns/locale/fr";
const site = lume({
src: "./src",
location: new URL("https://www.pickaria.fr/"),
});
site
.use(tailwindcss({
options: {
plugins: [typography],
/*darkMode: ['selector', '[data-mode="dark"]'],*/
theme: {
fontFamily: {
sans: ["Josefin Sans", "system-ui", "sans-serif"],
serif: ["system-ui", "serif"],
},
extend: {
colors: {
"background": "var(--background)",
"foreground": "var(--foreground)",
"foreground-secondary": "var(--foreground-secondary)",
"muted": "var(--muted)",
"muted-secondary": "var(--muted-secondary)",
},
},
},
},
}))
.use(postcss())
.use(date({ locales: { fr } }))
.use(picture())
.use(transformImages())
.use(svgo())
.use(redirects({
output: "netlify",
}))
.use(robots({
rules: [
{
userAgent: "*",
disallow: "/assets/",
},
],
}))
.use(sitemap())
.use(metas())
.use(nav())
.use(lightningCSS())
.use(minifyHTML())
.copy("assets/videos")
.copy("assets/icons")
.copy("assets/fonts")
.copy("assets/js")
.copy("favicon.ico")
.preprocess([".md"], (pages) => {
for (const page of pages) {
page.data.excerpt ??= (page.data.content as string).split(/<!--\s*more\s*-->/i)[0].trim();
}
});
export default site;