-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_config.ts
66 lines (60 loc) · 1.52 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
//imports
import lume from "lume/mod.ts";
import tailwindcss from "lume/plugins/tailwindcss.ts";
import postcss from "lume/plugins/postcss.ts";
import metas from "lume/plugins/metas.ts";
import sitemap from "lume/plugins/sitemap.ts";
import pageFind from "lume/plugins/pagefind.ts";
import date from "lume/plugins/date.ts";
import codeHighlight from "lume/plugins/code_highlight.ts";
// init site
const site = lume({
src: "./src",
location: new URL("https://lume-deno-template.deno.dev/"),
components: {
variable: "components",
},
});
// adding plugins
site.use(
tailwindcss({
options: {
darkMode: "class",
},
})
);
site.use(postcss());
site.use(metas());
site.use(codeHighlight());
site.use(date());
site.use(sitemap());
site.use(
pageFind({
ui: {
resetStyles: false,
containerId: "search",
showImages: false,
},
})
);
// static files
site.copy("assets");
// ignored files/directories
site.ignore("README.md", "CHANGELOG.md");
// global variables | site info
site.data("siteInfo", {
name: "Lume Template",
version: 1.0,
repo: "https://github.com/ArnavK-09/lume-deno-template",
description: "A Simple template to kickstart your lume site ",
});
// image alts if not prsent
site.process([".html"], (page) => {
page.document?.querySelectorAll("img").forEach((img) => {
if (!img.hasAttribute("alt")) {
img.setAttribute("alt", "Website image!");
}
});
});
// export
export default site;