-
Notifications
You must be signed in to change notification settings - Fork 2
/
_config.ts
executable file
·51 lines (46 loc) · 1.4 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
import lume from "lume/mod.ts";
import date from "lume/plugins/date.ts";
import postcss from "lume/plugins/postcss.ts";
import terser from "lume/plugins/terser.ts";
import codeHighlight from "lume/plugins/code_highlight.ts";
import basePath from "lume/plugins/base_path.ts";
import slugifyUrls from "lume/plugins/slugify_urls.ts";
import resolveUrls from "lume/plugins/resolve_urls.ts";
import markdownEmoji from "https://jspm.dev/markdown-it-emoji";
import gpm from "https://deno.land/x/[email protected]/mod.ts";
import netlifyCMS from "lume/plugins/netlify_cms.ts";
import generatePdf from "./eventHandlers/generatePdf.ts";
const markdown = {
plugins: [markdownEmoji],
};
const site = lume(
{
location: new URL("https://denissb.github.io/"),
},
{ markdown }
);
site.addEventListener("afterUpdate", (event) => {
const isCVUpdate = event.files && event.files.has("/cv.md");
if (isCVUpdate) {
generatePdf({
targetFolder: "./assets",
uri: "/cv",
fileName: "Deniss_Borisovs_CV.pdf",
});
}
});
site
.ignore("README.md")
.copy("img")
.copy("assets")
.copy("snaptext")
.use(postcss())
.use(terser())
.use(date())
.use(codeHighlight())
.use(basePath())
.use(slugifyUrls({ alphanumeric: false }))
.use(resolveUrls())
.use(netlifyCMS({ netlifyIdentity: true }))
.addEventListener("beforeBuild", () => gpm(["oom-components/searcher"], "js/vendor"));
export default site;